NEW194390
indent/outdent execCommand does some wrong/unneeded re-parenting
https://bugs.webkit.org/show_bug.cgi?id=194390
Summary indent/outdent execCommand does some wrong/unneeded re-parenting
Javier Fernandez
Reported 2019-02-07 04:32:15 PST
Created attachment 361388 [details] Test case to reproduce the issue What steps will reproduce the problem? (1) Load the attached case (2) Select all the text elements (3) Click on ident button (4) Click on outdent button What is the expected result? After step 3, both text elements are indented and are still inline children of the block with blue border (see indent-outdent-firefox.html) After step 4, both text elements are outdented, getting back to the original rendered HTML (indent-outdent-firefox-1.html What happens instead? After step 3, both text elements are indented but they have their own parents; they are not siblings anymore. (see indent-outdent-chrome.html) After step 4, the text elements in the first line is not children of the block with blue border (see indent-outdent-chrome-1.html)
Attachments
Test case to reproduce the issue (386 bytes, text/html)
2019-02-07 04:32 PST, Javier Fernandez
no flags
expected result after step 3 (34.24 KB, image/png)
2019-02-07 04:34 PST, Javier Fernandez
no flags
expected result after step 4 (34.28 KB, image/png)
2019-02-07 04:34 PST, Javier Fernandez
no flags
Actual result after step 3 (40.03 KB, image/png)
2019-02-07 04:34 PST, Javier Fernandez
no flags
Actual result after step 4 (32.70 KB, image/png)
2019-02-07 04:35 PST, Javier Fernandez
no flags
Javier Fernandez
Comment 1 2019-02-07 04:34:02 PST
Created attachment 361389 [details] expected result after step 3
Javier Fernandez
Comment 2 2019-02-07 04:34:20 PST
Created attachment 361390 [details] expected result after step 4
Javier Fernandez
Comment 3 2019-02-07 04:34:53 PST
Created attachment 361391 [details] Actual result after step 3
Javier Fernandez
Comment 4 2019-02-07 04:35:19 PST
Created attachment 361392 [details] Actual result after step 4
Javier Fernandez
Comment 5 2019-02-07 04:37:35 PST
I've started a discussion [1] with the Editing TF to clarify which would be the expected behavior, and it seems that both Frefox and Edge renders this case correctly. It seems that Chrome has the same bug, so I've filed a bug [2] there so that I can solve what it looks like a clear interoperability issue. [1] https://github.com/w3c/editing/issues/190 [2] https://bugs.chromium.org/p/chromium/issues/detail?id=929630
Ryosuke Niwa
Comment 6 2019-02-07 13:46:20 PST
Regardless of what editing TF concludes, it seems unlikely that we'd fix this in WebKit anytime soon because indent/outdent is already over constrained. There is so much happening during indentation & outdentation that we won't have a fine control like not creating a block element.
Note You need to log in before you can comment on or make changes to this bug.