Joining 2 paragraphs merges different style <font> elements
Categories
(Core :: DOM: Editor, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox111 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 1 open bug, )
Details
Attachments
(1 file)
Bug 1811434 - Make `HTMLEditor` never join `<font>` elements if they have different styles r=m_kato!
(deleted),
text/x-phabricator-request
|
Details |
Testcase: https://jsfiddle.net/d_toybox/4q6adhku/
When there are 2 paragraphs and both paragraphs have <font>
element with different size
and/or color
attributes, put caret at start of the second paragraph and type Backspace
, then, the second paragraph's <font>
element is removed and joining the
text in the first paragraph's <font>
element. (I tested this with setting editor.join_split_direction.compatible_with_the_other_browsers
to true
, I guess that the result will be reverted if this is set to false
.)
Of course, Chrome does not join them.
I found this bug in Yahoo Mail, so this is a real web-compat issue in a major web app at least.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Currently, HTMLEditor
joins inline elements if the tag name is same and the
specified CSS style is not different. However, this may cause loosing style
specified by <font>
elements at joining 2 paragraphs etc. We should not
join <font>
elements if they have:
- different values for
color
,size
orface
- only one has
color
,size
orface
I don't delete unnecessary testcases in delete.js
and forwarddelete.js
which
are same as adding tests because deleting them causes unexpected failures of
some following tests near the boundary of test chunks. Perhaps, we should
group them better in another bug.
Comment 4•2 years ago
|
||
bugherder |
Description
•