Skip to content

Commit

Permalink
fix(tool_tip): stop propagation on escape key down
Browse files Browse the repository at this point in the history
closes #8130
  • Loading branch information
weronikaolejniczak committed Nov 18, 2024
1 parent 316a864 commit f74e9d4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/eui/src/components/tool_tip/tool_tip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ export class EuiToolTip extends Component<EuiToolTipProps, State> {

onEscapeKey = (event: React.KeyboardEvent<HTMLSpanElement>) => {
if (event.key === keys.ESCAPE) {
event.stopPropagation();
this.setState({ hasFocus: false }); // Allows mousing over back into the tooltip to work correctly
this.hideToolTip();
}
Expand Down

0 comments on commit f74e9d4

Please sign in to comment.