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 14119 - Strip collapsed whitespace on insertText
Summary: Strip collapsed whitespace on insertText
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-09-12 20:11 UTC by Aryeh Gregor
Modified: 2012-11-15 22:02 UTC (History)
4 users (show)

See Also:


Attachments

Description Aryeh Gregor 2011-09-12 20:11:25 UTC
Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=681626

In a case like "foo[] ", if you insert a space, it becomes "foo [] ".  Thus the extra space is no longer collapsed.  It should be "foo []", same as if you started with "foo[]".  Alternatively, it could be "foo [] ", with the trailing space still present but ignored.  But it seems nicer to take the opportunity to clean up.
Comment 2 Aryeh Gregor 2011-09-22 21:29:13 UTC
More tests:

https://dvcs.w3.org/hg/editing/rev/b94bc4cceb61
Comment 3 LĂ©onie Watson 2012-11-15 17:37:19 UTC
Comment via Rich Schwerdtfeger:

This text exists in the canvas element specification: 
"When authors use the canvas element, they must also provide content that, when presented to the user, conveys essentially the same function or purpose as the bitmap canvas. This content may be placed as content of the canvas element. The contents of the canvas element, if any, are the element's fallback content."