execCommand('bold') behavior is different from Blink
Categories
(Core :: DOM: Editor, defect, P3)
Tracking
()
People
(Reporter: dalius.dobravolskas, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [h2review-noted])
Attachments
(1 file)
|
12.28 KB,
text/html
|
Details |
Updated•7 years ago
|
Updated•7 years ago
|
Comment 1•5 years ago
•
|
||
Note that Firefox thinks font-weight: 500 is bold enough and tries to un-bold it, while Chrome only does the same thing starting from font-weight: 600. It doesn't depend on how the font actually renders; for example, font-weight: 550 for Times New Roman means a bold text but Chrome still tries to make it bold again, getting no visual change just as this bug describes.
Updated•5 years ago
|
Comment 2•5 years ago
|
||
This is exactly the behavior difference described in the execCommand spec.
Masayuki, should Gecko behavior match Blink one? The spec author seems to think Blink one better matches intuition.
Comment 3•5 years ago
|
||
Well, if Safari is also using same threshold, changing our threshold must be better for web-compat, but I'm not sure about backward compatibility and usual font rendering result. Perhaps, I think that we should file new spec issue and ask other vendors if our behavior is better for font rendering result.
Updated•5 years ago
|
Updated•5 years ago
|
Updated•3 years ago
|
Old issue but I am running into this today. I feel like for consistency with Chrome / Safari, the behavior of document.queryCommandState('bold') and document.execCommand('bold') should be changed.
Currently, if some text has a font-weight of 500 or more, calling document.queryCommandState('bold') in Firefox returns true. I believe that threshold should be changed be 600 or more similar to other browsers.
Description
•