Space character being deleted in Gmail composer
Categories
(Core :: DOM: Editor, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr128 | --- | unaffected |
| firefox133 | --- | unaffected |
| firefox134 | --- | unaffected |
| firefox135 | + | verified |
People
(Reporter: overholt, Assigned: masayuki)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
STR
- (I'm using a 2024-12-16 Nightly as I file this and will restart to see if it still reproduces) open the Gmail composer
- type 'how are you doing' and notice that it offers to complete with the question mark
- rather than pressing Tab or typing ?, type space
Expected
- you get a space
Actual
- no space character is there
| Reporter | ||
Comment 1•11 months ago
|
||
I can still reproduce with a 2024-12-18 Nightly.
| Assignee | ||
Comment 2•11 months ago
|
||
Hmm, when I type a white-space, a <br> does not appear after that. However, I cannot reproduce this bug with a simple testcase.
I'll check what occurs within a debug build.
| Assignee | ||
Comment 3•11 months ago
|
||
Hmm, it could be both bugs of ours and theirs. When I type first white-space when there is ? [tab], we cannot put <br> after the typed white-space since it's followed by ? [tab]. However, after that, there are a lot of empty text nodes after the caret. It seems that that causes our white-space scanner confusing. I try to fix the latter today. Then, let's check the former would still be reproducible.
| Assignee | ||
Comment 4•11 months ago
|
||
Ah, the latter is a very minor bug of inserting white-space at invisible trailing white-space at end of the block... Well, I'll try to put <br> by the mutation by the web app.
| Assignee | ||
Comment 5•11 months ago
|
||
Okay, I succeeded to hack. I'll post a patch.
Comment 6•11 months ago
|
||
Set release status flags based on info from the regressing bug 1923251
| Assignee | ||
Comment 7•11 months ago
|
||
Gmail composer puts non-editable <span> to show a suggestion to make
autocomplete feature available. Then, if user types a white-space, Gmail
composer replaces or deletes the non-editable <span>.
When user types a white-space before the non-editable <span>, our editor does
not think that <br> is required to make the white-space visible because of
the following non-editable text. However, it'll be removed asynchronously.
Then, the white-space becomes invisible trailing white-space of the block and
Selection is collapsed after it. Therefore, following editing behaves odd
because our editor does not handle correctly editing in invisible white-spaces.
As you know, Gecko is the only browser to use the ASCII space (U+0020) as a
trailing collapsible white-space immediately before a block boundary.
Therefore, web apps may implement this feature with similar approach without
taking care of Gecko. Therefore, we should use a hack for our uses.
Fortunately, this may occurs only when user appends a collapsible white-space
to end of a Text node. Therefore, HTMLEditor can cache the last Text
node whose last character is recently appended collapsible white-space.
Then, when our mutation observer detects that the white-space becomes invisible,
the mutation observer can put a padding <br> element.
Unfortunately, the <br> is put with the transaction. Therefore, undoing it
deletes only the padding <br> and does not delete the white-space. However,
it's hard to touch transaction management right now. Therefore, this patch
does not fix this issue.
Depends on D231197
Updated•11 months ago
|
| Assignee | ||
Comment 8•11 months ago
|
||
Makoto-san, could you review this first rather than the other patches for the editor module? Thanks!
| Assignee | ||
Updated•11 months ago
|
Comment 11•11 months ago
|
||
The bug is marked as tracked for firefox135 (nightly). However, the bug still has low severity.
:hsinyi, could you please increase the severity for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.
For more information, please visit BugBot documentation.
Comment 12•11 months ago
|
||
(In reply to BugBot [:suhaib / :marco/ :calixte] from comment #11)
The bug is marked as tracked for firefox135 (nightly). However, the bug still has low severity.
:hsinyi, could you please increase the severity for this tracked bug? If you disagree with the tracking decision, please talk with the release managers.
For more information, please visit BugBot documentation.
I trusted the setting from Masayuki and we give this P1 to reflect the urgency of landing this.
Comment 13•11 months ago
|
||
| bugherder | ||
Updated•10 months ago
|
Reproduced the issue described in comment 0 using an old Nightly build from 2024-12-16, verified that using latest Firefox 135.0b8 build across platforms (Windows 11, macOS 13 and Ubuntu 22.04) this is no longer an issue.
Description
•