Skip to content

Commit

Permalink
fix(tooltip): prevent propagation of escape when open (#8503)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
joshblack and kodiakhq[bot] authored May 3, 2021
1 parent 0c4557b commit 4acc699
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react/src/components/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ class Tooltip extends Component {
handleEscKeyPress = (event) => {
const { open } = this.isControlled ? this.props : this.state;
if (open && keyDownMatch(event, [keys.Escape])) {
event.stopPropagation();
return this._handleUserInputOpenClose(event, { open: false });
}
};
Expand Down

0 comments on commit 4acc699

Please sign in to comment.