Bug 20788 - myExecCommand('indent') on LI results in a tree with incorrect nesting
myExecCommand('indent') on LI results in a tree with incorrect nesting
Status: NEW
Product: WebAppsWG
Classification: Unclassified
Component: HTML Editing APIs
unspecified
PC Linux
: P2 normal
: ---
Assigned To: Aryeh Gregor
HTML Editing APIs spec bugbot
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-27 22:11 UTC by Zbynek Winkler
Modified: 2013-02-01 12:54 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zbynek Winkler 2013-01-27 22:11:01 UTC
On a test case

<ul>
  <li>first</li>
  <li>second[]</li>
</ul>

calling myExecCommand('indent') in the js testing implementation results in

<ul>
  <li>first</li>
  <ul>
    <li>second[]</li>
  </ul>
</ul>

while I would expect

<ul>
  <li>first
    <ul>
      <li>second[]</li>
    </ul>
  </li>
</ul>

Most browsers follow the suit as do the editors built using the api except wysiwym and ckeditor that reimplement the indent commad to create the tree with the nesting according to my expectations.

I am not that fluent with debugging specs so it is hard for me to tell if the problem is only in the myExecCommand implementation or in the spec.
Comment 1 Aryeh Gregor 2013-02-01 12:54:16 UTC
Yes, the editing spec currently makes lists direct children of other lists without <li> in between.  IIRC, this matches browsers, despite being invalid according to HTML.