-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Description
Hey! I'm having an issue opening my custom modal with FocusTrap in StrictMode after upgrading to React 18. When the modal state is opened onDeactive is called immediately (probably because of the double render in Strictmode), which closes the dialog.
I see you have recently released a fix for StrictMode but it doesn't fix this issue.
I made a demo where i just copied the example from: demo/js/demo-special-element.js
The change i made in the demo is to only render the FocusTrap element when it is active.
Code sandbox demo: https://codesandbox.io/s/0vhfsb
Is this a bug or should i implement it differently?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels