Highlight text color is not preserved after pressing Enter in yahoo mails
Categories
(Core :: DOM: Editor, defect, P1)
Tracking
()
People
(Reporter: phorea, Assigned: masayuki)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
Found in
- Firefox 103 beta 4
Affected versions
- Firefox 102 (RC and ESR)
- Firefox 103 beta 4
- latest Nightly 104.0a1 2022-07-04
Affected platforms
- Win 10 64-bit
- Ubuntu 22
- OSX 10.14.6
Steps to reproduce
- Access the following website: https://mail.yahoo.com/ and login
- Compose a new email
- Select
Text color
option from the bottom of the new email composition - Select a highlight color and start typing
- Press Enter
Expected result
- Highlight color is preserved after pressing Enter
Actual result
- Highlight color is applied only for the first row, then it changes to the default one
Regression range
- Pushlog: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=a67baeba9a658f8650657389f38aa9bc7e2eef07&tochange=f895a0b6c0e3748e11381173b3cd32a7bb8c60dd
DEBUG : Found commit message: Bug 1730429 - part 2: Delete empty inline elements which become newly empty but preserve the styles for next editing r=m_kato
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
I created an account, and tried to compose a new email with the default settings, but I cannot reproduce it with the STR. Do you still reproduce it?
It could be fixed by the Yahoo side? (bug 1730429 aligns the behavior to the other browsers.)
Reporter | ||
Comment 2•2 years ago
|
||
(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900)(Away: ~6/29) from comment #1)
This reproduces on all Firefox versions since bug 1730429 landed.
It also reproduces on outlook mail, please see the attachment (I will provide the credentials we use for outlook on a private message).
Reporter | ||
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
Thank you. I took a mistake. I checked with foreground color, not background color. I managed reproduce this too.
Assignee | ||
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Set release status flags based on info from the regressing bug 1730429
Updated•2 years ago
|
Assignee | ||
Comment 5•2 years ago
•
|
||
Sigh, I got the expected result with raw DOM test cases. So, this could be caused by that Gecko runs a UA specific path in Outlook and Yahoo! Mail.
Assignee | ||
Comment 6•2 years ago
|
||
Oh, I see. This is what the minimized testcase.
https://jsfiddle.net/d_toybox/xwa91u4j/3/
Assignee | ||
Comment 7•2 years ago
|
||
At the post-processing here, the DOM tree becomes:
<span style="background-color:xxx">foo</span></div>
<div><span style="background-color:xxx">{}<span><br></div>
Then, the <span>
is removed.
However, Chrome creates the new paragraph as:
<div><span style="background-color:xxx">{}<br><span></div>
So, perhaps, we should move the invisible <br>
into the <span>
before checking if it's removable.
Assignee | ||
Comment 8•2 years ago
|
||
It seems that the Outlook issue is another bug.
Assignee | ||
Comment 9•2 years ago
|
||
I realize that this bug is not reproducible if I test it with list items.
The symptom is different in Yahoo! Mail and Outlook from point of view of the DOM tree result. However, I found a useful utility method CopyLastEditableChildStylesWithTransaction
which is used by HandleInsertParagraphInListItemElement
and it fixes both Yahoo! Mail and Outlook, so using it must be the safest way to uplift.
Assignee | ||
Comment 10•2 years ago
|
||
Hmm, CopyLastEditableChildStylesWithTransaction
has some problems. So it's not good to use in a patch for uplifting to ESR...
Assignee | ||
Comment 11•2 years ago
|
||
In Yahoo! Mail, the paragraph has <br>
after <span>
element which has
background-color
. In this case, Gecko creates the following DOM tree after
splitting the paragraph:
<div><span>foo</span></div><div><span></span><br></div>
Then, the empty <span>
in the right paragraph will be removed by the
post-processing. However, in this case, the inline element is required for
preserving the style continued from the previous paragraph.
In this case, we should move the <br>
element into the <span>
to make
it non-empty and avoid it to be removed. This is compatible with Chrome.
Assignee | ||
Comment 12•2 years ago
|
||
The patch will fix the similar issue in Outlook too. However, it might be not safe to uplift in to ESR since it changes our traditional behavior. I think that it's safe to fix it in ESR102 after shipping the fix in the release channel.
Comment 13•2 years ago
|
||
Comment 14•2 years ago
|
||
bugherder |
Updated•2 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 17•2 years ago
|
||
Verified as fixed across platforms using Firefox 104 beta 5.
Assignee | ||
Comment 18•2 years ago
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]:
Regression in major web app (Yahoo Mail (this bug) and Outlook (bug 1778249))
[Affects Firefox for Android]:
Not sure whether they use same UI for mobile, but if in the desktop mode, it should be reproducible.
[Suggested wording]:
Highlight color is preserved correctly after typing Enter
in the mail composer of Yahoo Mail and Outlook.
[Links (documentation, blog post, etc)]:
Nothing.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Description
•