-
Notifications
You must be signed in to change notification settings - Fork 218
Description
Describe the bug
In the file useRootClose.ts
line91 you're using the fragile and deprecated window.event
global event handler. This is causing issues with browser engines that have followed standards deprecation and disabled this by default, leading to subtle errors and unexpected behaviour (without throwing) on sites that make use of this component.
The solution should be straightforward: use the event passed into the event handler instead (a cursory glance seems to indicate that that is e
in this case?
To Reproduce
Steps to reproduce the behaviour:
- Switch of window.event support (e.g. in Firefox, pref it off)
- Go to a site that uses react-overlays, e.g. this mastodon instance
- Try to click
ALT
on the image - Nothing happens
Reproducible Example
see above
Expected behaviour
It should pop up a tooltip but the event is lost (often, but sometimes not).
Environment (please complete the following information)
- Operating System: Windows 10
- Browser, Version: Pale Moon 33.8.1.2
- react-overlays Version: not sure, seems to be used on trunk/latest this way
Additional context
This bug was discovered by one of our users (Kris_88) on our forum. Full context in this thread:
https://forum.palemoon.org/viewtopic.php?f=70&t=32635