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 13976 - Backspacing in between two lists should merge them
Summary: Backspacing in between two lists should merge them
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - HTML Editing APIs (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Aryeh Gregor
QA Contact: HTML Editing APIs spec bugbot
URL:
Whiteboard:
Keywords:
Depends on: 13973
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-30 20:42 UTC by Aryeh Gregor
Modified: 2011-11-08 16:27 UTC (History)
2 users (show)

See Also:


Attachments

Description Aryeh Gregor 2011-08-30 20:42:37 UTC
Based on WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=35281

Tests for delete command:

    '<ol><li>foo</li></ol>{}<br><ol><li>bar</li></ol>',
    '<ol id=a><li>foo</li></ol>{}<br><ol><li>bar</li></ol>',
    '<ol><li>foo</li></ol>{}<br><ol id=b><li>bar</li></ol>',
    '<ol id=a><li>foo</li></ol>{}<br><ol id=b><li>bar</li></ol>',
    '<ol class=a><li>foo</li></ol>{}<br><ol class=b><li>bar</li></ol>',
    '<ol><ol><li>foo</ol><li>{}<br><ol><li>bar</ol></ol>',
    '<ol><ol><li>foo</ol><li>{}<br></li><ol><li>bar</ol></ol>',

None of these merge the lists.  Also, the second-to-last doesn't normalize sublists -- delete code is evidently broken entirely for non-normalized nested lists (sigh).

Not going to try this until I refactor!
Comment 1 Aryeh Gregor 2011-08-30 20:43:23 UTC
Tests added: http://aryeh.name/gitweb.cgi?p=editing;a=commitdiff;h=929993fe
Comment 2 Aryeh Gregor 2011-11-08 16:27:39 UTC
https://dvcs.w3.org/hg/editing/rev/b3afc97ff16e

I added a whole bunch more tests than the ones from comment 0.  See bug 14727 for the sublist normalization issue.