W3C home > Mailing lists > Public > www-style@w3.org > February 2013

Re: [cssom-view] Proposal to add getClientRect method to CaretPosition

From: L. David Baron <dbaron@dbaron.org>
Date: Tue, 12 Feb 2013 15:08:48 -0800
To: "Robert O'Callahan" <robert@ocallahan.org>
Cc: Scott Johnson <sjohnson@mozilla.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <20130212230848.GA23413@crum.dbaron.org>
On Wednesday 2013-02-13 11:48 +1300, Robert O'Callahan wrote:
> Can you use Range.getClientRects() to do what you need?
> http://dev.w3.org/csswg/cssom-view/#widl-Range-getClientRects-ClientRectList

No, because Range doesn't allow addressing caret positions inside of
text inputs and textareas (unless we expose the "anonymous content"
that's inside of them, which we don't want to do).  CaretPosition,
on the other hand, has special rules for its behavior inside of
textareas and text inputs that are quite useful, but which also make
it impossible to convert with full fidelity to a Range that we'd be
willing to expose to Web content.


𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂
Received on Tuesday, 12 February 2013 23:09:16 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:08 UTC