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
Hi!
I have an edge case, where I click from a mounted element that immediately gets unmounted, then the listener handler can't see it "contained" inside the reference object, then it catches it as a "click outside". I tried to use a stopPropagation() but I stumbled upon the same limitation explained in this post:
so the React synthetic events are attached to window, not to document, then the stopPropagation does not work :(
I already tried it out and attaching the listener to window instead of document works fine. Do you think it's worth to add it to the library? (maybe even as an option?) I can make a PR.
The text was updated successfully, but these errors were encountered:
@sneridagh Thanks for bringing this edge case to my attention - any chance you could post a sandbox link with a simple version of the issue you're facing (with or without the solution you linked)?
@zhaluza I am facing also stopPropagation() problem so i had to add this and the package works then fine. I think this issue is happening with React 18 version. Please check this problem.
Again after installing the package it was not working properly that supposed do, but when I add stopPropagation() then works fine.
Thanks.
Hi!
I have an edge case, where I click from a mounted element that immediately gets unmounted, then the listener handler can't see it "contained" inside the reference object, then it catches it as a "click outside". I tried to use a
stopPropagation()
but I stumbled upon the same limitation explained in this post:https://dev.to/dvnrsn/why-isn-t-event-stoppropagation-working-1bnm
so the React synthetic events are attached to window, not to document, then the stopPropagation does not work :(
I already tried it out and attaching the listener to window instead of document works fine. Do you think it's worth to add it to the library? (maybe even as an option?) I can make a PR.
The text was updated successfully, but these errors were encountered: