Skip to content

Commit

Permalink
fix(safari and firefox): closing the popover and window click
Browse files Browse the repository at this point in the history
Use standard equivalent event.composedPath() instead of non-standard event.path.
  • Loading branch information
jyounce committed Jun 28, 2018
1 parent 89c8787 commit 1ac7e67
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/client/scripts/rb-popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ export class RbPopover extends withComponent(withRenderer()) {
}
_windowClick(e) { // :void
if (!this.showPopover) return;
if (e.path.includes(this.popoverElm)) return;
if (e.path.includes(this.triggerElm)) return;
const path = e.composedPath();
if (path.includes(this.popoverElm)) return;
if (path.includes(this.triggerElm)) return;
this.showPopover = false;
}

Expand Down

0 comments on commit 1ac7e67

Please sign in to comment.