Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix not clickable button with svg in Safari #1985

Merged
merged 3 commits into from
Jun 3, 2019

Conversation

maryia-lapata
Copy link
Contributor

Summary

This PR is related to this comment elastic/kibana#36896 (review) where an issue was detected: click event sometimes is not fired on a button with svg element in Safari and IE.

At the following screenshot you can noticed that 2nd-5th clicks don't lead to removing of rows:

May-31-2019 11-55-58

Checklist

  • This was checked in mobile
  • This was checked in IE11
  • This was checked in dark mode
  • Any props added have proper autodocs
  • Documentation examples were added
  • A changelog entry exists and is marked appropriately
  • This was checked for breaking changes and labeled appropriately
  • Jest tests were updated or added to match the most common scenarios
  • This was checked against keyboard-only and screenreader scenarios
  • This required updates to Framer X components

Copy link
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Add a changelog entry, also

@@ -11,6 +11,10 @@
padding: $euiSizeXS;
border-radius: $euiBorderRadius;

& > svg {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you wouldn't mind, add a comment here so it's clear why we have it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up on @thompsongl 's comment. Can you also point to documentation somewhere online that shows what the bug in Safari is and how this fixes it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I see, it's an issue particular to using <use> within the <svg> tag. We have a problem where Sketch likes to export our icons using this syntax

Screen Shot 2019-06-03 at 11 13 18 AM

But there are ways to avoid this and I try to do so when I'm exporting SVG's.

@snide & @ryankeairns This issue feels like it should be solved in the SVG's themselves and not with this generic selector though it also feels like it might be good to have as a backup. Thoughts?

I do think we should really go through and cleanup any <defs> and <use> usages, but should we keep this in as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I made a follow-up issue to resolve in the icons themselves. #1989 Thanks for adding the comment @maryia-lapata

@snide
Copy link
Contributor

snide commented Jun 3, 2019 via email

@thompsongl thompsongl merged commit 5e2a5fa into elastic:master Jun 3, 2019
@maryia-lapata maryia-lapata deleted the eui-icon branch June 4, 2019 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants