On 12/16/2016 06:32 PM, Ehsan Akhgari wrote:
* The developer facing APIs.  As you have noted above, our selection API
allows you to construct and examine multi-range selections.  This is
something that we should fix at some point, since other browser vendors
have been very clear that they won't implement this functionality

Quoting Ryosuke Niwa, the current spec author:
"As a vendor (Apple), we have quite a bit of interest in improving
selection for bidirectional text and new CSS layout modes such as flex
box and grid layout which can change the order of context. One way to
achieve that would be supporting multi-range selection.
As a spec author, there has been some discussion about bringing back multi-range selection, there is no wide support nor consensus about it."
https://bugzilla.mozilla.org/show_bug.cgi?id=1323681#c5

Quoting Tab Atkins Jr. from the same bug:
"Yeah, Selection is just *silly* in common Grid cases under the old
'single start and end DOM locations' model. Need multi-range selection to
make it work."
https://bugzilla.mozilla.org/show_bug.cgi?id=1323681#c7

I've made an example Grid to illustrate that last point, try selecting
the first column then the second (first some A's then some B's)
(you need Nightly or DevEdition for the example to work):
https://people-mozilla.org/~mpalmgren/tests/grid/grid-selection.html
I agree with Tab that this is going to happen *a lot*.

I think we should work with Ryosuke to develop a better Selection API
so that handling multi-range Selection comes naturally.  That part
doesn't seem that hard to me; the problem is mostly about getting web
developers to use the new API, but if we can make it just a little bit
nicer than getRangeAt() then I believe we can win them over.


* The user facing functionality.  Currently we expose multi-range
selections to the user in the following ways (perhaps among others that
I'm missing?):

  * Table cell selection (by Ctrl/Cmd-clicking on several table cells
allows you to select them all)
  * Mouse based selection (by holding Ctrl/Cmd when selecting something
on a page with another selection present)
  * (and perhaps touch based selection also similarly, but I don't have
a device I can test that on)

* user selection over CSS '-moz-user-select:none' regions
* user selection in CSS Grid layout (eventually :-) )


/Mats

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to