Ctrl+Backspace in Gmail email composer deletes the last word *and space character* (though the cursor shows up after space character until you start typing)
Categories
(Web Compatibility :: Site Reports, defect, P2)
Tracking
(Not tracked)
People
(Reporter: dholbert, Unassigned)
References
(Depends on 1 open bug, )
Details
(Keywords: webcompat:platform-bug, webcompat:site-report)
User Story
platform:windows,mac,linux impact:annoyance configuration:general affects:all branch:release
Attachments
(2 files)
STR:
- Compose a new email in Gmail.
- Type
abc def
into the email body. - On Linux/Windows, hold Ctrl and press Backspace. Or on macOS, hold "option" and press Backspace. Note that the "def" disappears and the cursor is now shown after the space character, looking like
abc |
- Now type another character (e.g.
g
)
EXPECTED RESULTS:
The g
should be inserted after the space (where the cursor was), so you should end up seeing abc g
ACTUAL RESULTS:
The space disappears, so you end up seeing abcg
I'm using Ubuntu 24.10.
Chrome gives EXPECTED RESULTS.
Firefox 133.0a1 (2024-10-17) (64-bit) gives ACTUAL RESULTS.
(This is a longstanding bug, I think; not sure if it's been reported before, but I'm not finding anything when searching bugzilla for "ctrl backspace gmail"; hence, filing.)
Reporter | ||
Comment 1•8 days ago
|
||
Reporter | ||
Comment 2•8 days ago
•
|
||
Still reproduces if I activate Chrome mask, so this probably is not a UA-sniffing issue. There may be an actual platform difference of some sort, or something where Gmail is taking different codepaths based on some browser-specific feature other than the UA string.
Reporter | ||
Comment 3•8 days ago
|
||
If I take a look at the relevant node in devtools, I can see that Firefox ends up with the following, with a trailing space character:
<div class="gmail_default" style="font-family:arial,sans-serif">abc </div>
(we don't show the trailing space visually in DevTools, but it's there if I do right-click | edit-as-html)
...whereas Chrome ends up with a
:
<div class="gmail_default" style="font-family:arial,sans-serif">abc </div>
If I use devtools to swap out our space for a
(what Chrome has there), then I end up getting EXPECTED RESULTS.
Reporter | ||
Comment 4•8 days ago
|
||
Reporter | ||
Comment 5•8 days ago
|
||
This isn't reproducible in some of my systems/Firefox-profiles, so there might be some A/B testing involved here with different experiences being served some of the time.
So far, I've always been able to reproduce in a fresh profile (repro'd in a fresh profile on Ubuntu 24.10 on two different machines, and in macOS on another machine).
In the existing profiles that I have where the bug-does-not-reproduce, the thing that seems to save me is a <br>
element that persists at the very end of the <div class="gmail_default">
element for whatever reason. That <br>
stays there when I delete the "def" text in step 3 (it ends up immediately after the space character), and it seems to ensure that the space stays there when I type my "g" in step 4.
Reporter | ||
Comment 6•8 days ago
|
||
Turns out this is quite-easy to repro with just a simple contenteditable div; I spun off bug 1925635 as the underlying platform bug here.
This also impacts comments in Google Docs (not the main doc content, just comments).
Reporter | ||
Comment 8•5 days ago
•
|
||
(In reply to :glob ✱ from comment #7)
This also impacts comments in Google Docs
Overholt filed bug 1926087 on that; we can consider it a distinct webcompat site-report for now (with the same underlying platform bug).
(I'm pretty sure I've tripped over this in Google Calendar event-description-text, too.)
Comment 9•4 days ago
|
||
I see this in the Fastmail composer, too, FWIW.
Updated•3 days ago
|
Reporter | ||
Comment 10•3 days ago
•
|
||
This turned out to have been partly-caused by the patches that landed in bug 1923251. Masayuki and I backed that out earlier today, which will probably make this no-longer-reproducible in tomorrow's nightly, hopefully.
(bug 1923251 is what turned out to be responsible for deleting the all-important <br>
element that I referenced in comment 5. At the time I wrote comment 5, I thought my "good" sessions (where the <br>
persisted and propped up its neighboring space character) were a result of some Gmail A/B testing, but in fact I'm pretty sure those "good" sessions were just environments where I was running a slightly-out-of-date nightly.)
Description
•