W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

Re: [Selection] Support of Multiple Selection (was: Should selection.getRangeAt return a clone or a reference?)

From: Mats Palmgren <mats@mozilla.com>
Date: Tue, 13 Jan 2015 22:05:43 +0000
Message-ID: <54B596B7.4040300@mozilla.com>
To: Ben Peters <Ben.Peters@microsoft.com>, Olivier Forget <teleclimber@gmail.com>, Aryeh Gregor <ayg@aryeh.name>
CC: Ryosuke Niwa <rniwa@apple.com>, Koji Ishii <kojiishi@gmail.com>, Webapps WG <public-webapps@w3.org>, robin@w3.org, Norbert Lindenberg <w3@lindenbergsoftware.com>
On 01/12/2015 07:59 PM, Ben Peters wrote:
> Multiple selection is an important feature in the future.

Indeed, there are many important use cases for it.

Here are some use cases that are implemented using multi-range selections
in Gecko today:
  * visual selection of bidirectional text
  * selecting table columns
  * selecting multiple fragments of arbitrary content (just hold CTRL)
  * selection with disjoint unselected islands due to CSS user-select:none
  * mapping spell-checking errors
  * highlighting matched words for "Find in Page"

> I do not believe “everyone wants to kill it” is accurate. I agree with
> Olivier that it’s crucial to a full-featured editor. We don’t want to
> make sites implement this themselves.

Strongly agreed.  This is complicated to implement correctly and can be
very slow if you're not careful.  It should be implemented in the UA.

Since Ranges are well specified, including how they stay valid under
DOM mutations (DOM spec), I don't see why we should re-invent the wheel
here.  Especially since there is no alternative proposal on the table.

BTW, this topic was discussed a while ago on this list:

Received on Tuesday, 13 January 2015 22:06:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:43 UTC