-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Writing flow: Esc should enter Nav mode consistently, avoid focus loss when clearing selection #42530
Conversation
…s when clearing selection
Size Change: -5 B (0%) Total Size: 1.26 MB
ℹ️ View Unchanged
|
I was hoping this would also fix the weird page jump (scroll up) that Introduce distraction free mode has. Alas, following a rebase the problem is still there :( |
@draganescu Could you report it separately and ping me? I'll have a look. |
@ellatrix the problem is introduced in #41740 and I was hoping it was a trunk bug but it isn't. If you have the space to check out #41740 and:
It only happens in #41740 and I can't say how to start debugging it. When I saw this PR here I had a (lazy) idea that maybe my bug would magically disappear - it didn't 😁 If you do check out #41740 it would help if I get an idea what could happen on hitting ESC and entering nav mode that could make the page jump .. and I can continue from there 👍🏻 |
@draganescu I'm not sure. If you comment out |
What?
Currently Esc only enters Navigation mode when a single block is selected. When multiple are selected, selection is cleared.
This PR makes Esc behaviour more consistent by always entering Navigation mode. When pressing Esc from Navigation mode, selection will be cleared and focus will be returned to the editor wrapper (currently focus is lost).
Why?
Consistency & focus loss.
How?
Testing Instructions
Select a few blocks. Press Esc. You should be in Navigation mode. Press Esc again. Block selection should be cleared and focus should be on the wrapper. Pressing Cmd+A should select all blocks (which confirms focus was not lost).
Screenshots or screencast