-
Notifications
You must be signed in to change notification settings - Fork 400
fix(Tooltip): adds esc listener #2248
fix(Tooltip): adds esc listener #2248
Conversation
Deploy preview for carbon-components-react ready! Built with commit 2102a0a https://deploy-preview-2248--carbon-components-react.netlify.com |
@@ -266,6 +266,8 @@ class Tooltip extends Component { | |||
requestAnimationFrame(() => { | |||
this.getTriggerPosition(); | |||
}); | |||
|
|||
document.addEventListener('keydown', this.handleEscKeyPress, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please clean-up this event listener on un-mount.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the quick review! Keep it up!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool. Thanks! When @asudoh's fixes are in looks good to me. 馃槑
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 馃憤 - Thanks @paschalidi!
@asudoh is something holding us back here? |
@paschalidi Sorry for being late! |
Hello 馃憢 !
Closes https://github.com/IBM/carbon-components-react/issues/1764
Adds event listener so that Esc key closes
Tooltip
when state isopen
.Changelog
New
Adds event listener so that Esc key closes
Tooltip
when state isopen
.