NEW203961
[GTK] Style toggling using editing commands produces incorrect output
https://bugs.webkit.org/show_bug.cgi?id=203961
Summary [GTK] Style toggling using editing commands produces incorrect output
Milan Crha
Reported 2019-11-07 09:22:58 PST
What I want to achieve: Write "000" in normal font, then write "111" in B+I+U+S, then write "222" in B+U, by turning off I+S I do this in WebKit Inspector with: document.body.contentEditable = true; document.body.innerHTML = ""; document.execCommand("insertText", false, "000"); document.execCommand("Bold", false, ""); document.execCommand("Italic", false, ""); document.execCommand("Underline", false, ""); document.execCommand("StrikeThrough", false, ""); document.execCommand("insertText", false, "111"); document.execCommand("Italic", false, ""); document.execCommand("StrikeThrough", false, ""); document.execCommand("insertText", false, "222"); Webkit produces HTML, which: draws "000" in normal font, then draws "111" in B+I+U, the 'S' is missing, then draws "222" in B, the 'U' is missing. The HTML code looks like: 000<b><strike style="font-style: italic; text-decoration: underline;">111</strike>222</b> --------------------------------------------------------------- When I execute the same code in Firefox (67.0), it works as expected and generates this HTML code: 000<strike><u><i><b>111</b></i></u></strike><u><b>222</b></u>
Attachments
Note You need to log in before you can comment on or make changes to this bug.