geist-ui
geist-ui copied to clipboard
Unexpected behavior in the Drawer component when using the 'keyboard' and 'disableBackdropClick' properties together.
trafficstars
Bug report 🐞
Using the keyboard and disableBackdropClick properties on the Drawer component, follow these steps to reproduce the issue:
- Open the Drawer
- Click outside the Drawer (on the backdrop/shadow).
- press "Esc"
The Drawer does not close when pressing Esc if the last click was on the backdrop / outside the Drawer
Version & Environment
- Version of browser: Google Chrome 112.0.5615.138
- Version of
geist-ui/core: 2.3.8
Expected Behaviour
The behavior I expect is that, even if the last click was outside the Drawer, the component closes when pressing Esc.
Some users may get confused and may not understand that it is necessary to click inside the Drawer container for the Esc button to work to close it