[whatwg] Control over selection direction
Aryeh Gregor
Simetrical+w3c at gmail.com
Sun Jan 16 12:21:52 PST 2011
On Fri, Jan 14, 2011 at 4:06 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:
> If you accept that other selection APIs can't be used in textarea / input,
> then why would you expect your property/method to specify direction can be?
> Specifically that this direction property/method works for textarea / input
> and other properties/method doesn't is very inconsistent, and very unlikely
> to be adopted by browser vendors. (I for one will not support such an
> interface if proposed in the WebKit community).
Currently there are two totally different selection APIs. There's one
for selections in the DOM, which is accessed using
window.getSelection():
<http://html5.org/specs/dom-range.html#apis-for-the-browsing-context-selection:-the-selection-interface>.
But this doesn't work for text in inputs/textareas, since that's not
in the DOM, so they have their own API:
<http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#textFieldSelection>
The two APIs are already unrelated and inconsistent, which is bad,
but that's the situation. The proposal here is to extend the latter
API slightly. So I'm not sure what you mean.
More information about the whatwg
mailing list