Skip to content

Instantly share code, notes, and snippets.

@nicinabox
Created March 28, 2017 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicinabox/ebdff8984f56b24bc153f45faf77aa54 to your computer and use it in GitHub Desktop.
Save nicinabox/ebdff8984f56b24bc153f45faf77aa54 to your computer and use it in GitHub Desktop.
checkForOuterAction: function checkForOuterAction(event) {
+ if (event.defaultPrevented) return
var isOuterAction = !this.containerEl.contains(event.target) && !this.targetEl.contains(event.target);
if (isOuterAction) this.props.onOuterAction(event);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment