Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape key should not close the editor #2199

Closed
PVince81 opened this issue Feb 23, 2022 · 10 comments · Fixed by #2906
Closed

Escape key should not close the editor #2199

PVince81 opened this issue Feb 23, 2022 · 10 comments · Fixed by #2906
Assignees
Labels
3. to review accessibility bug Something isn't working design Experience, interaction, interface, …

Comments

@PVince81
Copy link
Member

Describe the bug
Don't close the editor unexpectedly when hitting escape.

To Reproduce
Steps to reproduce the behavior:

  1. Type some text
  2. Select a portion of the text
  3. Hit escape to unselect the text
  4. Be surprised, where did the editor go ?

Expected behavior
Editor stays open at all times when hitting Escape

Client details:

  • OS: openSUSE Tumbleweed
  • Browser: Firefox
  • Version: 97.0
  • Device: desktop

Server details:
c.nc.com

@PVince81 PVince81 added the bug Something isn't working label Feb 23, 2022
@juliusknorr
Copy link
Member

@jancborchardt @nimishavijay What do you think about this one? I agree that initial escape should probably be catched during editing so that one could get the keyboard focus back to other ui elements, but not sure if we should then on the second escape not still close the viewer with text open.

@juliusknorr juliusknorr added design Experience, interaction, interface, … needs info labels Feb 23, 2022
@PVince81
Copy link
Member Author

does the escape key also close Collabora ?

for a viewer I think escape key closing is fine but not something you can work actively in

@mejo-
Copy link
Member

mejo- commented Feb 23, 2022

I think that Text in Viewer is a bit different than a picture, video or PDF. If I open a file for editing, I wouldn't expect the editor to disappear when hitting Esc. Even not when hit a second time. That's why I would suggest to catch Esc in general and don't let it close the viewer.

@nimishavijay
Copy link
Member

I think it's important for keyboard accessibility to have an easy way to close the editor using the keyboard. If nothing is selected/highlighted/no popovers or menus are open then I'd say it would be okay to close the editor. Since it feels like something "opened" like a modal, using Esc key to close it makes sense.
First Esc key could close any action menu or popover/unselect text and clicking the Esc key twice could close the editor.

@jancborchardt
Copy link
Member

First Esc key could close any action menu or popover/unselect text and clicking the Esc key twice could close the editor.

Fully agree on that.

Also tested with some other things:

  • Gmail doesn’t do any 2-step thing, Esc directly closes the composer and saves the draft
  • Notion "new page" does it similar to Gmail when you are in the title, but has a weird 2-step when in the content, selecting the "container"/"module" of the text
  • Any textarea or input field in the browser unselects on Esc, so yes it is behavior we should respect (LibreOffice unselects on Esc as well, for the record)

@mmuman
Copy link

mmuman commented Jun 22, 2022

It is especially painful when you use a ":" with a space before (as per French typography rules) and you get proposed emojis and you don't want them, you end up exiting the edition instead of getting out of the emoji selector.

@juliusknorr
Copy link
Member

juliusknorr commented Jul 20, 2022

Might also be an accessibility feature if we let esc bring the focus back to the page outside the editor field.

@susnux
Copy link
Contributor

susnux commented Jul 20, 2022

This is especially annoying as there is (as far as I know) no shortcut to close the formatting help popover except ESC, but that closes not only the formatting help but also the whole editor

@juliusknorr juliusknorr moved this to 🧭 Planning evaluation (don't pick) in 📝 Office team Sep 2, 2022
@juliusknorr juliusknorr moved this from 🧭 Planning evaluation (don't pick) to 📄 To do (~10 entries) in 📝 Office team Sep 2, 2022
@mejo-
Copy link
Member

mejo- commented Sep 6, 2022

So we have at least four cases where Esc should not close the editor but instead do something else:

  • When the emoji autocompletion list is open, Esc should close the list, not the editor
  • When the user mention autocompletion list is open, Esc should close the list, not the editor
  • When the formatting help modal is open, Esc should close this very modal, not the editor
  • When text is selected, Esc should unselect the text

@nimishavijay
Copy link
Member

I would also add that whenever any of the formatting options have menus (eg emojis, callouts etc) which are open, the esc key can first close that before closing the editor, right now if you are using your keyboard to open the callout menu, it stays open even if you navigate away to a different formatting option.
@mejo- @jancborchardt

Repository owner moved this from 📄 To do (~10 entries) to ☑️ Done in 📝 Office team Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review accessibility bug Something isn't working design Experience, interaction, interface, …
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

8 participants