Should have been an absolute check.

This commit is contained in:
tidy-dev 2023-12-06 16:53:33 -05:00
parent f1ac8b4f3c
commit 201d3ed285

View file

@ -387,7 +387,11 @@ export class Tooltip<T extends TooltipTarget> extends React.Component<
}
private onKeyDown = (event: KeyboardEvent) => {
if (event.key === 'Escape' && this.state.show && this.props.dismissable) {
if (
event.key === 'Escape' &&
this.state.show &&
this.props.dismissable !== false
) {
event.preventDefault()
this.beginHideTooltip()
}