[Webkit-unassigned] [Bug 15381] New: execCommand justify modifies the contentEditable node

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 5 14:04:00 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=15381

           Summary: execCommand justify modifies the contentEditable node
           Product: WebKit
           Version: 522+ (nightly)
          Platform: All
               URL: http://www.nick-santos.com/tests/justify_command.html
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML Editing
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: nicksantos at google.com


Steps to reproduce:
1) Create a contentEditable field with some text, and no display: block
elements.
2) In javascript, call document.execCommand("justifyRight", false)

Expected Result:
A block-level element should be created around the text with style='text-align:
right'. IE creates a <p> element.

Actual Result:
The contentEditable element has style='text-align: right.'

Notes:
As a general principle, execCommand should *never* modify the attributes of a
node with contentEditable on. There are all sorts of reasons why this is bad:
it may change the layout of the field itself, it makes it more difficult to get
the contents of the field, etc.

See the demo at the URL.


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



More information about the webkit-unassigned mailing list