Cannot delete selection with Ctrl + Backspace on Windows
Categories
(Core :: DOM: Editor, enhancement, P5)
Tracking
()
People
(Reporter: collantesro, Unassigned)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0
Steps to reproduce:
- Place cursor after some text in a text field, without anything selected.
- Press Ctrl-A on the keyboard
- Immediately press backspace
Actual results:
The text briefly flashes as it's selected, but then it deselects and the insertion cursor is at the beginning of the line. The timing between steps 2 and 3 needs to be really quick. I'm talking a frame or two.
I see this in the address bar as well, not just text fields.
Expected results:
All the text that was highlighted should be cleared. The text field should be empty.
Comment 1•5 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: Editor' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•5 years ago
|
||
Can you reproduce it in this test suite?
https://w3c.github.io/uievents/tools/key-event-viewer.html
Then, if you reproduce it, keydown event for Backspace key is fired correctly after all keyup events of Ctrl + A without ctrl flag?
Comment 3•5 years ago
|
||
I can reproduce this and yes, the backspace happens after Control+A.
Comment 4•5 years ago
|
||
Oh BTW, I think this is because we implemented Control+Backspace to not actually remove the content.
Comment 5•5 years ago
|
||
Actually Control+Backspace does delete something if in multiline.
| Reporter | ||
Comment 6•5 years ago
|
||
Ah, so it appears the order of events is this: Ctrl Keydown, A keydown, Backspace keydown, Ctrl Keyup, A keyup, Backspace keyup.
Comment 7•5 years ago
|
||
Yup, so it's indeed Control+Backspace.
Comment 8•5 years ago
|
||
Thank you for the testing!
And yeah, the result is what I assumed.
Ctrl + Backspace does nothing in Wordpad and Word. Gecko respects their behavior as standard manner of Windows. However, Notepad deletes the selection, and <input>/<textarea> are similar to Nodepad rather than Wordpad/Word. So, I think that it's okay to delete selection at least in TextEditor for compatibility with Chrome and Gecko in the other platforms.
Comment 9•4 years ago
|
||
Hi collantesro!
I believe this issue was fixed in bug 1457149.
If possible, could you confirm whether this issue no longer happens?
Thanks!
Comment 10•4 years ago
|
||
Should be fixed by bug 1457149 at least in <input> and <textarea>.
Description
•