Closed patrykkopycinski closed 1 year ago
Wondering what was the problem you've solved this way. This code is fighting mostly with browser behavior, not react.
This patch works for me as well. I used it for modal and the click on a backdrop went through the underlying element and "tapped" it.
Sorry for the confusion but the patch did not work (somehow it worked as I wrote the last comment).
I took a video of the issue to visualize the problem.
I tried to debug the issue but I can't solve it. But I figured out it doesn't work if it's a TouchEvent
. On a MouseEvent
it works as intended.
Do you have a hint to solve this?
Ok. So the issue is that you can "click-through" the backdrop. Now we are talking πΌ
Just a quick check - is it working on production mode as well? π There are some presently discovered "race conditions" caused by StrictMode/double-rendering.
Ok. So the issue is that you can "click-through" the backdrop. Now we are talking πΌ
Exactly.
Just a quick check - is it working on production mode as well?
The issue is still on production and was filed from one of our beloved testers.
https://user-images.githubusercontent.com/531853/188813694-c6a08430-18e3-4787-a523-cef4d3e317a9.mov
There are some presently discovered "race conditions" caused by StrictMode/double-rendering.
Seems plausible. In my case I am not using React.StrictMode
in the app.
If you need more info just drop me a line.
Are there any news? Do you need more info on this?
This issue has been marked as "stale" because there has been no activity for 2 months. If you have any new information or would like to continue the discussion, please feel free to do so. If this issue got buried among other tasks, maybe this message will reignite the conversation. Otherwise, this issue will be closed in 7 days. Thank you for your contributions so far.
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch
react-focus-on@3.5.4
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.