W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2014

RE: [editing] Suggested selection.extend can not select based on how the text currently displayed

From: Ben Peters <Ben.Peters@microsoft.com>
Date: Fri, 19 Sep 2014 18:52:20 +0000
To: "erik@ictenablers.com" <erik@ictenablers.com>, "public-webapps@w3.org" <public-webapps@w3.org>
CC: "ayg@aryeh.name" <ayg@aryeh.name>
Message-ID: <6226acb6de344eda83ef76d1f9b88f52@BLUPR03MB437.namprd03.prod.outlook.com>
Selection.extend is a separate API from Selection.modify. They are both listed by Mozilla at https://developer.mozilla.org/en-US/docs/Web/API/Selection?redirectlocale=en-US&redirectslug=DOM%2FSelection for reference. Thanks for the feedback!

Ben

From: erik@ictenablers.com [mailto:erik@ictenablers.com]
Sent: Wednesday, September 17, 2014 11:06 AM
To: public-webapps@w3.org
Cc: ayg@aryeh.name
Subject: [editing] Suggested selection.extend can not select based on how the text currently displayed

Dear all,

My interpretation of the suggested selection.extend is that it can not select based on how the text is displayed. I'm thinking in particular of the feature to extend to the lineboundary, like this:

var selectionPoint = window.getSelection();

selectionPoint.modify('extend','backward','lineboundary');

Supported by most browsers (not IE) this could be used to for example select or highlight a line of text that the user clicks on.

This feature can have both practical and accessibility uses.



Best regards,

Erik




Received on Friday, 19 September 2014 18:52:52 UTC

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