Bug 43447
| Summary: | Outdent moves text before other text | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Julie Parent <jparent> |
| Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ahmad.saleem792, ap, ayg, rniwa |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | All | ||
Julie Parent
Repro steps:
1. Start with the following HTML inside an editable region:
<blockquote>one <font color="#FF0000" id='font'>two<br>three</font></blockquote>
2. Select "three"
3. execCommand('outdent')
Result:
"three" moves BEFORE "one two" and "e two" is selected. HTML is:
<span class="Apple-style-span" style="color: rgb(255, 0, 0); ">three</span><br><blockquote>one <font color="#FF0000" id="font">two<br></font></blockquote>
Expected Result:
"three" stays after "one two", "three" remains selected, "three" is no longer indented
Demo here (click eval js to execute the select and execCommand): http://plexode.com/eval3/#ht=%3Cdiv%20contentEditable%3E%0A%3Cblockquote%3Eone%26nbsp%3B%3Cfont%20color%3D%22%23FF0000%22%20id%3D'font'%3Etwo%3Cbr%3Ethree%3C%2Ffont%3E%3C%2Fblockquote%3E%0A%3C%2Fdiv%3E&ohh=1&ohj=1&jt=document.getSelection().setBaseAndExtent(font.lastChild%2C%200%2C%20font.lastChild%2C%20font.lastChild.length)%3B%0Adocument.execCommand('outdent'%2C%20false%2C%20null)%3B%0A&ojh=0&ojj=0&ms=100&oth=0&otj=0&cex=1
Discovered in Google Sites.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Aryeh Gregor
More minimal test case:
<blockquote><span>foo<br>[bar]</span></blockquote>
Ahmad Saleem
Using test case from Comment 01, I am not able to reproduce this bug but using plexode from Comment 0, these are results:
*** Chrome Canary 110 & Safari 16.1 / STP 158 ***
One
Three (RED)
TWO (RED)
*** Firefox Nightly 109 ***
One TWO (RED)
Three (RED)
___
Just wanted to share updated results. Thanks!