[Webkit-unassigned] [Bug 203610] New: [GTK] 'RemoveFormat' editing command changes style of the parent block element
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Oct 30 07:25:03 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=203610
Bug ID: 203610
Summary: [GTK] 'RemoveFormat' editing command changes style of
the parent block element
Product: WebKit
Version: Other
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKitGTK
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mcrha at redhat.com
CC: bugs-noreply at webkitgtk.org
I do not expect the 'RemoveFormat' editing command to also influence 'style' attribute of the parent's block (div/p/...) of the active selection, but maybe I'm wrong.
Steps to reproduce:
a) open the Web Inspector of a WebKitWebView and switch to the console;
b) execute these two commands:
document.documentElement.innerHTML = "<body><div style='text-align:right'>aaa <b>bbb <i>iii <u>uuu</u></i></b> xxx</div></body>"
document.getSelection().setBaseAndExtent(document.body.firstElementChild.firstElementChild.firstChild, 1, document.body.firstElementChild.firstElementChild.firstElementChild.firstChild, 2)
c) it created a document with right-aligned div and selected 'bb ii' in it
d) remove the format on the selection, by executing this command:
document.execCommand("RemoveFormat")
The outcome is that the selected text is neither bold nor italic, as expected, but the text is aligned to the left now, while it should stay aligned to the right.
It can be that it's only an overlook on the text-align style (and maybe some other), because when the div has style: "text-align:right; color:orange;", then the color is preserved, only the text-align is reset after the RemoveFormat command.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191030/d2805c52/attachment.htm>
More information about the webkit-unassigned
mailing list