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
I have a modal in my web app that displays a button that opens a RainbowKit modal. When the RainbowKit modal is open, I would expect hitting escape to just dismiss RainbowKit (the top-most modal), but both dismiss because they're both listening to the escape keypress.
Are there any tips for handling this case in a not-one-off nature? I don't want to have to teach every type of modal (first-party and third-party) about each others' open state. And preventing default seems weird/not appropriate here?
I imagine something like a focus trap might help, but neither modal seems to be using such a thing.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a modal in my web app that displays a button that opens a RainbowKit modal. When the RainbowKit modal is open, I would expect hitting escape to just dismiss RainbowKit (the top-most modal), but both dismiss because they're both listening to the escape keypress.
Are there any tips for handling this case in a not-one-off nature? I don't want to have to teach every type of modal (first-party and third-party) about each others' open state. And preventing default seems weird/not appropriate here?
I imagine something like a focus trap might help, but neither modal seems to be using such a thing.
Beta Was this translation helpful? Give feedback.
All reactions