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 13811 - Handle collapsed whitespace better
Summary: Handle collapsed whitespace better
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:
Blocks:
 
Reported: 2011-08-17 20:47 UTC by Aryeh Gregor
Modified: 2011-09-21 20:46 UTC (History)
3 users (show)

See Also:


Attachments

Description Aryeh Gregor 2011-08-17 20:47:41 UTC
I need to test cases where we have spaces in between blocks, like what happens if you backspace with "<p>foo</p> <p>[]bar</p>", or do insertOrderedList with "<ol><li>foo</ol> <p>[]bar</p>", things like that.  I suspect I don't handle it well in some places, although now that such whitespace is counted as invisible, deletion should hopefully handle it okay.
Comment 1 Ehsan Akhgari [:ehsan] 2011-08-17 21:22:54 UTC
These are collapsed whitespaces, right?  I think their presence should not change anything.
Comment 2 Aryeh Gregor 2011-08-18 16:47:16 UTC
Well, they have to be treated specially in some cases.  E.g., if you do insertOrderedList with "<ol><li>foo</ol> <p>[]bar</p>", it should stick the space in the list too, so it becomes "<ol><li>foo</li> <li>[]bar</ol>".  Currently I'm pretty sure it becomes "<ol><li>foo</ol> <ol><li>[]bar</ol>", which is a bug.  I just need to add lots of tests like these and fix any brokenness in the results.
Comment 3 Aryeh Gregor 2011-09-21 18:39:35 UTC
I added some in the course of doing something else:

https://dvcs.w3.org/hg/editing/rev/b2d328d179ac
https://dvcs.w3.org/hg/editing/rev/4321a7e11603

I still need to add more, at least covering list toggling.
Comment 4 Aryeh Gregor 2011-09-21 20:46:16 UTC
I fixed a lot of this:

https://dvcs.w3.org/hg/editing/rev/ee2791b98b92

There are probably still bunches of lingering issues, though, which I'll have to work out over time as I think of them.