timc1 / kbar

fast, portable, and extensible cmd+k interface for your site
https://kbar.vercel.app
MIT License
4.84k stars 185 forks source link

Safari exits full screen when closing the menu using the escape key #264

Closed piofinn closed 1 year ago

piofinn commented 1 year ago

Bug 🐞

The escape key is bound to exiting full screen mode in Safari by default. Therefore the browser window exits full screen when using escape to close the kbar dialog.

Suggested fix ✨

Set event.preventDefault() where the escape key press is handled.

jakewtaylor commented 11 months ago

I'm still seeing this happen in chromium browsers, but only if I first navigate into a group, then backspace back to the top, then Escape - closes the kbar dialog but also exits fullscreen.

Any ideas @timc1 ?