sabigara / flat

Clean, minimal web client for Bluesky
https://flat.sabigara.com
MIT License
42 stars 10 forks source link

ESC to close post composer #17

Closed sabigara closed 1 year ago

sabigara commented 1 year ago
Screenshot 2023-04-23 12 10 00

https://github.com/sabigara/flat/blob/main/src/app/post/components/PostComposer.tsx#L147

The above component is using Headless UI which should support "ESC to close" out of the box, but not working for some reason.

Environment

Can't reproduce with Firefox.

flbn commented 1 year ago

can't reproduce? assuming you patched in this commit? https://github.com/sabigara/flat/commit/2f14f7c0458fd0fb1e3f8de48a3517a91b6a9af5

sabigara commented 1 year ago

I didn't fix this in the commit.

Hmm, seems this is a browser-specific issue…. I can't close on Chrome and Safari but Firefox does it well (on Mac). What's your environment? It would be helpful if you retry with other browsers.

sabigara commented 1 year ago

FYI, I'm working on i18n and it's almost done with the English translation. Visit the below link in case you are in trouble with Japanese UI text.

https://flat-git-i18n-sabigara.vercel.app

It should automatically display English text but you can select the language on settings page (change "言語").

flbn commented 1 year ago

oooo, yea that PR is nice! can confirm, english translation without needing to go on settings.

flbn commented 1 year ago

Hmm, seems this is a browser-specific issue…. I can't close on Chrome and Safari but Firefox does it well (on Mac). What's your environment? It would be helpful if you retry with other browsers.

weird, bug doesn't exist on any browser for me...

M1 Pro, 2020 - macOS, Ventura 13.3.1 

tested on Chrome 112.0.5615.137 (Official Build) (arm64) 
tested on Safari 16.4 (18615.1.26.11.23)
sabigara commented 1 year ago

Oops, turned out Vimium and React Inspector on my Chrome and Safari are preventing the behavior in some ways… What's weird is that ESC key itself seems just working but maybe something is going wrong internally.

Sorry for taking your time but this wasn't a bug! If you still want to cotribute to this project, I will make some issues.