[Webkit-unassigned] [Bug 204685] New: [GTK] List (UL/OL) end works only partially with nested lists

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 28 09:33:21 PST 2019


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

            Bug ID: 204685
           Summary: [GTK] List (UL/OL) end works only partially with
                    nested lists
           Product: WebKit
           Version: Other
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mcrha at redhat.com
                CC: bugs-noreply at webkitgtk.org

It's convenient to end lists (UL/OL) with press of an Enter key when the item content (LI) is empty. The problem is that is doesn't work properly for nested lists.

Steps:
a) open JavaScript console and execute these commands:

   document.body.contentEditable = true;
   document.body.innerHTML = "<ul><ul><ul><li>a</li></ul><ul><li>b</li></ul></ul></ul>";

b) place cursor after letter 'a' and press Enter
   - as expected, a new item with empty text at the same level as 'a' is created
c) press Enter again
   - as expected, the empty item is removed and the UL is closed, which creates a new item in the parent's UL
d) press Enter again
   - unexpected, a new empty LI is added at the same level as the previous empty LI, which is left there too;
   - repeating step d) does the same thing all the time
   - expected is to have removed the empty LI and closed the UL on the second level and added an empty LI to its parent, just as below:

Trying the same in the second LI:
1) place cursor after letter 'b' and press Enter
   - as expected, a new item with empty text is added, at the same level as 'b'
2) press Enter
   - as expected, empty item is removed, a new item is added into parent of the removed item's UL (second level)
3) press Enter
   - as expected, empty item is removed, a new item is added (first level)
4) press Enter
   - as expected, empty item is removed, a new DIV is added directly under the BODY

The split of the 'a' and 'b' into separate UL-s doesn't have any influence on the behaviour, I can merge them (*) and the outcome will be the same.

(*) document.body.innerHTML = "<ul><ul><ul><li>a</li><li>b</li></ul></ul></ul>";

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191128/5f7d7f4a/attachment.htm>


More information about the webkit-unassigned mailing list