Open Bug 1425650 Opened 7 years ago Updated 2 years ago

Text deletion failure with Ctrl A, Backspace

Categories

(Core :: DOM: Selection, defect, P3)

57 Branch
x86
Windows
defect

Tracking

()

People

(Reporter: casyvaf, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0 Build ID: 20171206182557 Steps to reproduce: In a text field, such as Google.com's search box, hitting ctrl+a backspace *VERY* quickly will trigger the behavior described below. 100% reproducible in Firefox. Also, this 100% does NOT happen in Chrome. Actual results: If ctrl+a backspace is hit *VERY* quickly, the following happens: The cursor jumps to the beginning of the line. The text highlighted by ctrl+a is no longer highlighted. The text is neither deleted nor modified. Expected results: What should happen instead is, the text highlighted by ctrl+a should be deleted no matter how soon thereafter backspace is hit.
I had to try this a few times to hit it, but if done very quickly, which a quick typist may do often, it's reproducible.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Forgot to mention that I am also on Windows 10.
I've also reproduced this problem on a very clean Windows 10 install, both on 57 and 52 ESR. It's very subtle and may require multiple attempts to reproduce, you have to hit Backspace within a quarter of a second or so of doing CTRL+A. On a Linux machine this problem is *not* reproducible at all, so this seems to be Windows specific at this point, perhaps even Win10-specific; I don't have any Windows 7 or 8 machines so I can't test there.
Reproduced it on latest nightly on windows 7. Worth to note: ctrl + a = select all ctrl + backspace = delete the entire word just before the cursor the quick ctrl + a + backspace combination which fails correctly highlights the text after ctrl + a (meaning the action was performed) and then backspace makes the cursor go back to the beginning of the line (which is not a usual behavior)
Component: Untriaged → Selection
OS: Unspecified → Windows
Product: Firefox → Core
Hardware: Unspecified → x86
Priority: -- → P1
Priority: P1 → P3
See Also: → 1380908

Still getting this issue. Happens in user chrome as well inside of the omnibox

Windows: Microsoft Windows 10 Pro, 10.0.19041
Firefox: 80.0.1 (64-bit), 81.0 (64-bit)

Have the same issue in any text fields in Firefox, including the browser's Address bar.

As it was said, pressing Ctrl+Backspace is removing the word before cursor but when a text is selected it's takes the cursor position at the start of the selection.
As a result, it does not remove the selected text (which is expected), instead it's removing the word before selected text if any. If whole text is selected then it's just cancel selection and set cursor at the beginning of the text field.

Windows 10.
p.s. the bug does not exist in Firefox in macOS (I suppose for macOS the text field is handled by OS)

this happen to me, in firefox nightly latest arch linux.
this only since the last update.

this happen to me after updating this three packages

69 [2021-06-17T21:49:36+0700] [ALPM] upgraded libnm (1.30.4-3 -> 1.32.0-1)
12870 [2021-06-17T21:49:45+0700] [ALPM] upgraded linux (5.12.10.arch1-1 -> 5.12.11.arch1-1)
12871 [2021-06-17T21:49:48+0700] [ALPM] upgraded networkmanager (1.30.4-3 -> 1.32.0-1) 

(In reply to norlin from comment #6)

Have the same issue in any text fields in Firefox, including the browser's Address bar.

As it was said, pressing Ctrl+Backspace is removing the word before cursor but when a text is selected it's takes the cursor position at the start of the selection.
As a result, it does not remove the selected text (which is expected), instead it's removing the word before selected text if any. If whole text is selected then it's just cancel selection and set cursor at the beginning of the text field.

This can be fixed by opening "about:config" and changing "layout.selection.caret_style" to "2". More information can be found here.

This has been consistently reproduced by me over the past 2 years. I am using Firefox Developer Edition version 94.0b3 (64-bit).
Microsoft Windows 10 Home version 10.0.19043 Build 19043

I tried to fix by changing layout.selection.caret_style to 2 but the behavior stayed the same...
Is there any other fix for this?

(In reply to pazzaz.sundqvist from comment #9)

(In reply to norlin from comment #6)

Have the same issue in any text fields in Firefox, including the browser's Address bar.

As it was said, pressing Ctrl+Backspace is removing the word before cursor but when a text is selected it's takes the cursor position at the start of the selection.
As a result, it does not remove the selected text (which is expected), instead it's removing the word before selected text if any. If whole text is selected then it's just cancel selection and set cursor at the beginning of the text field.

This can be fixed by opening "about:config" and changing "layout.selection.caret_style" to "2". More information can be found here.

I can confirm that pazzaz.sundqvist's solution works. I would also like to add that the error is not just fast pressing ctrl+a+backspace, but holding ctrl while pressing backspace. On default if you select some text and then press ctrl+backspace the cursor jumps before the selected text without deleting it, so to avoid this you have either let go of ctrl before pressing backspace or change the mentioned setting.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.