Skip to content

Commit

Permalink
fix(Tooltip,Popover): account for shadowDOM target (#1769)
Browse files Browse the repository at this point in the history
Ref #1691
  • Loading branch information
TheSharpieOne committed Jan 27, 2020
1 parent b96f65a commit 10ccf12
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/TooltipPopoverWrapper.js
Expand Up @@ -162,7 +162,11 @@ class TooltipPopoverWrapper extends React.Component {
show(e) {
if (!this.props.isOpen) {
this.clearShowTimeout();
this.currentTargetElement = e && e.currentTarget;
this.currentTargetElement = e ? e.currentTarget || e.target : null;
if (e && e.composedPath && typeof e.composedPath === 'function') {
const path = e.composedPath();
this.currentTargetElement = path && path[0] || this.currentTargetElement;
}
this.toggle(e);
}
}
Expand Down

0 comments on commit 10ccf12

Please sign in to comment.