You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are known issues that occur with the focus event:
iframe can cause the focus event to fire numerous times if the user interacts with the iframe and then back with the current document
DevTools can cause the focus event to fire numerous times if the user/developer interacts with the DevTools and then back with the document. (A very common case for developers)
A developer fires a focus event (ie. node.dispatchEvent(new CustomEvent('focus', { bubbles: true}))). This case seems less likely but still a side-effect of the current implementation.
We may also want to check what other libraries, like swr, are doing.
Proposed Solution
Check whether the Page Visiblity API can help with this
Reimplement refocusExchange with the new API
Preserve IE11 support with fallbacks, polyfills, or workarounds (or an alternative approach entirely?)
The text was updated successfully, but these errors were encountered:
kitten
added
the
future 🔮
An enhancement or feature proposal that will be addressed after the next release
label
Oct 14, 2020
Noone has picked this up as far as I'm aware, feel free to give it a shot. In case you're not sure or want some guidance you can put it up as draft and I'd be glad ot help out where I can.
See: #1055
Summary
There are known issues that occur with the
focus
event:iframe
can cause thefocus
event to fire numerous times if the user interacts with theiframe
and then back with the current documentfocus
event to fire numerous times if the user/developer interacts with the DevTools and then back with the document. (A very common case for developers)focus
event (ie.node.dispatchEvent(new CustomEvent('focus', { bubbles: true}))
). This case seems less likely but still a side-effect of the current implementation.We may also want to check what other libraries, like
swr
, are doing.Proposed Solution
refocusExchange
with the new APIThe text was updated successfully, but these errors were encountered: