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

[ClickAwayListener] Fix interaction with SVGElement #10318

Merged
merged 3 commits into from Feb 16, 2018

Conversation

KEMBL
Copy link
Contributor

@KEMBL KEMBL commented Feb 16, 2018

in a situation when some <svg ... > element exists on page ClickAway() is not triggered because svg element is not an "instanceof HTMLElement"

in a situation when some <svg ... > element exists on page ClickAway() is not triggered because svg element is not an "instanceof HTMLElement"
@oliviertassinari oliviertassinari changed the title Fix: ClickAway() is not triggered when user clicks on SVGSVGElement [ClickAwayListener] Fix interaction with SVGElement Feb 16, 2018
@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Feb 16, 2018
@@ -35,7 +35,7 @@ class ClickAwayListener extends React.Component {
const el = findDOMNode(this);

if (
event.target instanceof HTMLElement &&
(event.target instanceof HTMLElement || event.target instanceof SVGElement) &&
Copy link
Member

Choose a reason for hiding this comment

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

I believe this line was added to please flow type. We have removed flowtype since then. I think that it's safe to remove it. cc @rosskevin

@oliviertassinari
Copy link
Member

@KEMBL Good catch 👍

@oliviertassinari oliviertassinari merged commit 218c6c2 into mui:v1-beta Feb 16, 2018
@oliviertassinari
Copy link
Member

@KEMBL It's a great first-time pull request 👌🏻. Thank you for giving it a shot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants