Skip to content

Commit

Permalink
click outside did not close the portal in some cases because HTML tag…
Browse files Browse the repository at this point in the history
…name was ignored, that was because we tried to prevent closing when scrollbar was clicked, however this is a bigger issue... if you know about some workaround for ignoring scrollbar, let me know
  • Loading branch information
tajo committed Mar 13, 2016
1 parent 94d20f5 commit 0eea441
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/portal.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default class Portal extends React.Component {
if (!this.state.active) { return; }

const root = findDOMNode(this.portal);
if (root.contains(e.target) || e.target.tagName === 'HTML' || e.button !== 0) { return; }
if (root.contains(e.target) || e.button !== 0) { return; }

e.stopPropagation();
this.closePortal();
Expand Down

0 comments on commit 0eea441

Please sign in to comment.