Replies: 1 comment 3 replies
-
Hiya 👋 Sorry for the late reply! I've created an RFC for this change and will see whether someone has time soon to look into this! It's a great suggestion! #1063 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello 👋, I was looking into the
urql
implementation for therefocus
exchange (@urql/exchange-refocus
). I noticed that it utilizeswindow.addEventListener('focus', ...)
for handling the focus. I found a few issues with this implementation: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.I'm curious if you have considered utilizing the Page Visibility API to achieve a more true implementation for "refocus" of the window.
Thank you for taking the time to consider my suggestion!
Beta Was this translation helpful? Give feedback.
All reactions