Custom Drawer component via Modal/Dialog with Framer Motion not capturing escape key exit #7208
Unanswered
deltasierra96
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm creating a drawer component and all is mostly working fine, however the escape key doesn't close the Modal unless the user clicks inside. I suspect it's something to do with refs not being forwarded with the custom Motion components as when I remove them and retain the same component composition, it works as expected.
I followed something similar to the Gesture Driven Modal given in the RAC examples and the escape key functionality appears to work just fine.
Drawer component:
Useage:
Beta Was this translation helpful? Give feedback.
All reactions