-
Notifications
You must be signed in to change notification settings - Fork 844
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
Conversation
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cchaos here links to issues with similar cases, where the applied solution is described:
There was a problem hiding this comment.
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
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?
There was a problem hiding this comment.
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
Makes sense to do both.
…On Mon, Jun 3, 2019, 8:17 AM Caroline Horn ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/components/button/button_icon/_button_icon.scss
<#1985 (comment)>:
> @@ -11,6 +11,10 @@
padding: $euiSizeXS;
border-radius: $euiBorderRadius;
+ & > svg {
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
[image: Screen Shot 2019-06-03 at 11 13 18 AM]
<https://user-images.githubusercontent.com/549577/58812909-be212800-85f0-11e9-9f24-18fad9739031.png>
But there are ways to avoid this and I try to do so when I'm exporting
SVG's.
@snide <https://github.com/snide> & @ryankeairns
<https://github.com/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?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1985?email_source=notifications&email_token=AACPHJ3XTQ7DZFVR6BI63MTPYUYYHA5CNFSM4HRWVNR2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOB2MZWPY#discussion_r289897585>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACPHJ3ZARG6FRWCOVRHPMLPYUYYHANCNFSM4HRWVNRQ>
.
|
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:
Checklist