-
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
Add option to keep caret inside block in edit mode #23546
Conversation
Size Change: -338 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
Hi @tellthemachines 👋 I just tested this PR and everything worked as expected to me. I saw the new option and after turning it on, I was able to confirm that the caret stays constrained in the block. Turning it back off took me back to the default behaviour. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code wise this is looking good.
cc @mtias @jasmussen do you have thoughts here?
This seems good. On the one hand, it's good that the label is short and simple. But on the other hand, this is quite a profound change to the editor — it may be exactly what you're looking for, or it may break your experience entirely. I wonder if there's a more descriptive label we can find, or whether this may even be a place to add help text. "Cursor", for example, may even be imprecise, as you can move your cursor anywhere. Short option:
This is a bit more technical, actually, so not sure it's an improvement. But it feels more precise. Longer option:
Regardless of what we go with, I would say it's good to merge sooner rather than later, because it's a good option and we can alwasy polish the label if need be. |
Tested using NV Access in Firefox, works fine. |
@jasmussen I went with the short option for now; we can always review it later. Thanks everyone for your feedback! |
Description
Fixes #22190, builds on #22204.
Added "Keyboard options" section in "More tools & options > Options" modal, with checkbox labelled "Keep cursor inside active block". Checking it will stop arrow keys from navigating between blocks in edit mode. Navigation mode is not affected.
How has this been tested?
Tested in browser with keyboard.
Screenshots
Types of changes
New feature (non-breaking change which adds functionality)
Checklist: