This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20788 - myExecCommand('indent') on LI results in a tree with incorrect nesting
Summary: myExecCommand('indent') on LI results in a tree with incorrect nesting
Status: NEW
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - HTML Editing APIs (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Aryeh Gregor
QA Contact: HTML Editing APIs spec bugbot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-27 22:11 UTC by Zbynek Winkler
Modified: 2013-02-01 12:54 UTC (History)
2 users (show)

See Also:


Attachments

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.