-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Ctrl + backspace doesn't delete the entire word #3086
Comments
After a quick test, it seems that browsers support word deletion using word boundaries common to the English language, with no special support for other languages. For example, when pasting Japanese text, which doesn't use spaces between words, the whole line of text is deleted. In fact, the only special behavior is that it deletes line by line, not the whole text. |
Check this: ພາສາຈີນແມ່ນພາສາໜຶ່ງທີ່ເວົ້າໃນປະເທດຈີນ. And this: にほんごの クラスは かようびと もくようびです。 In my case, alt+backspace deletes bigger pieces of this text, but definitely not whole lines. Ctrl+backspace works like backspace. So, first of all, at least on macOS, alt+backspace means "delete word". I don't think that Ctrl+backspace has some special meaning. How's it on Windows?. Second of all, it's really not that simple. |
DUP reported in #501. |
I'm fine if we bring support for western languages first, before thinking to come with the perfect solution for all languages. |
Turns out that this gets heavily irritating for people who got used to this keystroke (e.g. to fix up typos). So, a temporary solution could be to discover ctrl+backspace (windows) or alt+backspace (macos) and delete the entire word by looking back to the previous space ( However, it seems that one day we'll need to start depending on mutations for this to work reliably anyway. There are two problems with handling backspace manually – Android (where there's no key code for backspace) and languages where "word" has a different shape in the text. Also, there may be other kinds of keystrokes like "delete the whole line" and by handling mutations we'd handle them too. This is a bigger task, though, due to all the tiny little details like diff failing on comparing "xxx^" with "xx^" (so we don't know which letter was removed), combined characters, IME (where selection isn't collapsed), the problems with inline styles, etc, etc. But all these things are also the reason to actually use mutations because if we make those heuristics good, we have a chance to handle all kinds of unexpected keystrokes and environments. |
Will be glad to see this live, lots of requests for it in Firefox Notes. |
This is actually partially supported by The problems in my opinion lays here: As it appears that I'll try to dig more into it and to implement |
Yep. We predicted this thing but never fully implemented it. |
@Reinmar how broad should we go with implementing this? A space only solution is I understand a minimal solution but maybe we should add other punctuation symbols ( As a reference here is Unicode Word Boundary specification. |
Max 3MH broad ;) |
Closed with ckeditor/ckeditor5-engine#1287. Great job! |
To have everything right in papers - I'm reopening this as there is still a PR awaiting in this repository which will enable |
Fix: Properly discover delete-word keyboard modifier on mac and non-mac computers. Closes #92.
Awesome! Thanks for fixing this! |
Reported in #414.
The text was updated successfully, but these errors were encountered: