Skip to content

Instantly share code, notes, and snippets.

@nicinabox
Created March 28, 2017 17:35
Show Gist options
  • Save nicinabox/ebdff8984f56b24bc153f45faf77aa54 to your computer and use it in GitHub Desktop.
Save nicinabox/ebdff8984f56b24bc153f45faf77aa54 to your computer and use it in GitHub Desktop.

Revisions

  1. nicinabox created this gist Mar 28, 2017.
    5 changes: 5 additions & 0 deletions react-popover.diff
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    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);
    },