[Webkit-unassigned] [Bug 30148] New: Applying h1 format to text node after HR tag fails to include first letter of text node.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 6 19:54:29 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=30148

           Summary: Applying h1 format to text node after HR tag fails to
                    include first letter of text node.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: michaelthomas at google.com
                CC: jparent at google.com, eric at webkit.org,
                    sullivan at google.com


STEPS TO REPRODUCE:
1. Go to midas demo: http://www.mozilla.org/editor/midasdemo/
2. Enter the following HTML: '<hr>test'
3. Place the cursor after the word 'test'.
4. Select 'Heading 1' from the menu.

RESULT:
The heading style is applied to the entire line except the first character:

<hr><h1><span class="Apple-style-span" style="font-weight: normal; font-size:
medium; ">t</span>est</h1>

EXPECTED:
The heading style is applied to the entire line:
<hr><h1>test</h1>

Automated test case:

http://www.plexode.com/cgi-bin/eval3.py#ht=%3Cdiv%20id%3D%22editor%22%20contenteditable%3Dtrue%3E%3Chr%3Etest%3C%2Fdiv%3E%0A&ohh=1&ohj=1&jt=var%20div%20%3D%20document.getElementById('editor')%3B%0A%0A%2F%2F%20Change%20this%20to%20select%20a%20range%0AselectRange(div.childNodes%5B1%5D%2C%204%2C%20div.childNodes%5B1%5D%2C%204)%3B%0A%0A%2F%2F%20Change%20this%20to%20run%20execCommand%0Adocument.execCommand('FormatBlock'%2C%20false%2C%20'%3Ch1%3E')%3B%0A%0Afunction%20selectRange(startNode%2C%20startOffset%2C%20endNode%2C%20endOffset)%20%7B%0A%20%20var%20sel%20%3D%20window.getSelection()%3B%0A%20%20var%20range%20%3D%20null%3B%0A%20%20try%20%7B%0A%20%20%20%20range%20%3D%20sel.getRangeAt(0)%3B%0A%20%20%7D%20catch(ex)%20%7B%0A%20%20%20%20range%20%3D%20document.createRange()%3B%0A%20%20%7D%0A%20%20range.setStart(startNode%2C%20startOffset)%3B%0A%20%20range.setEnd(endNode%2C%20endOffset)%3B%0A%20%20sel.removeAllRanges()%3B%0A%20%20sel.addRange(range)%3B%0A%7D&ojh=1&ojj=1&ms=100&oth=0&ot
 j=0&cex=1

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list