Closed Bug 1709201 Opened 5 years ago Closed 4 years ago

Cannot delete selection with Ctrl + Backspace on Windows

Categories

(Core :: DOM: Editor, enhancement, P5)

Firefox 90
x86_64
Windows 10
enhancement

Tracking

()

RESOLVED DUPLICATE of bug 1457149

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:

  1. Place cursor after some text in a text field, without anything selected.
  2. Press Ctrl-A on the keyboard
  3. 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.

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.

Component: Untriaged → DOM: Editor
Product: Firefox → Core

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?

Flags: needinfo?(collantesro)
Attached image event order

I can reproduce this and yes, the backspace happens after Control+A.

Flags: needinfo?(collantesro)

Oh BTW, I think this is because we implemented Control+Backspace to not actually remove the content.

Actually Control+Backspace does delete something if in multiline.

See Also: → 1340846
Attached video 2021-05-06_09-56-53.mp4

Ah, so it appears the order of events is this: Ctrl Keydown, A keydown, Backspace keydown, Ctrl Keyup, A keyup, Backspace keyup.

Yup, so it's indeed Control+Backspace.

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.

Severity: -- → S3
Status: UNCONFIRMED → NEW
Type: defect → enhancement
Ever confirmed: true
OS: Unspecified → Windows 10
Priority: -- → P5
Hardware: Unspecified → x86_64
Summary: Text field is not cleared when Ctrl-A (Select All) and Backspace are pressed in quick succession → Cannot delete selection with Ctrl + Backspace on Windows
See Also: → 1457149

Hi collantesro!
I believe this issue was fixed in bug 1457149.
If possible, could you confirm whether this issue no longer happens?
Thanks!

Flags: needinfo?(collantesro)

Should be fixed by bug 1457149 at least in <input> and <textarea>.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(collantesro)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: