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 13975 - Get rid of multi-Range Selections
Summary: Get rid of multi-Range Selections
Status: RESOLVED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - HTML Editing APIs (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement
Target Milestone: ---
Assignee: Aryeh Gregor
QA Contact: HTML Editing APIs spec bugbot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-30 20:30 UTC by Aryeh Gregor
Modified: 2011-10-05 20:00 UTC (History)
3 users (show)

See Also:


Attachments

Description Aryeh Gregor 2011-08-30 20:30:00 UTC
They're horribly confusing, and no one but Gecko plans to ever support them.  Selections should always have either zero or one range.  We do need some way to allow users to deal with table columns and such, but there's probably a better way.  Even if there's not, I'm really unconvinced that it's worth the pain of the status quo.

As agreed upon with Ehsan and Ryosuke.
Comment 1 Karl Dubost 2011-08-31 12:58:53 UTC
Note that it is used in applications such as TextEdit on MacOSX for example. And it's quite practical when you are for example quoting the text of a Web page, but you want to copy only part of it. It's a lot easier than multiple cut and paste from one window (context) to another one. 

There might be issues for copy markup, but for copy text only it is quite cool.

That said, maybe a mechanism where you could have an incremental copy would be cool. 

1. Select and Copy
2. Select and Copy = OldCopy + NewCopy

You add the select to the buffer, a bit less practical than the previous multi-range.
Comment 2 Aryeh Gregor 2011-09-01 14:53:01 UTC
The issue here is only the author-exposed selection.  UAs can still allow the user to select multiple things at once, as long as only one range is exposed in the Selection object.  User actions like copy and paste could still deal with the whole visible selection.

At some point we might want to support some way of exposing non-contiguous selections to the author, but the current way is just far too error-prone.  Gecko developers themselves don't even support multi-range selections sanely.  Ehsan had a demo where when he selected three things at once in a contenteditable region, and ran three different execCommands.  The first one affected only the first part of the selection, the second affected only the second part, and the third affected only the third part.  He had no idea why.  (Maybe execCommand was removing the affected range from the selection's list and re-adding it at the end?)
Comment 3 Aryeh Gregor 2011-09-22 19:31:45 UTC
Moving Selection-related bugs to editing: see bug 14248, bug 14252.
Comment 4 Aryeh Gregor 2011-10-05 20:00:05 UTC
http://dvcs.w3.org/hg/editing/rev/b1598801692d