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

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

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 13 Feb 2013 12:18:42 +1300
Message-ID: <CAOp6jLYy7Hs9whTfYJyxUYKNz+QiBdk=KmhpAScreZOngNZ_WQ@mail.gmail.com>
To: "L. David Baron" <dbaron@dbaron.org>
Cc: Scott Johnson <sjohnson@mozilla.com>, "www-style@w3.org" <www-style@w3.org>
On Wed, Feb 13, 2013 at 12:08 PM, L. David Baron <dbaron@dbaron.org> wrote:

> 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.
>

Right, that makes sense.

Rob
-- 
Wrfhf pnyyrq gurz gbtrgure naq fnvq, “Lbh xabj gung gur ehyref bs gur
Tragvyrf ybeq vg bire gurz, naq gurve uvtu bssvpvnyf rkrepvfr nhgubevgl
bire gurz. Abg fb jvgu lbh. Vafgrnq, jubrire jnagf gb orpbzr terng nzbat
lbh zhfg or lbhe freinag, naq jubrire jnagf gb or svefg zhfg or lbhe fynir
— whfg nf gur Fba bs Zna qvq abg pbzr gb or freirq, ohg gb freir, naq gb
tvir uvf yvsr nf n enafbz sbe znal.” [Znggurj 20:25-28]
Received on Tuesday, 12 February 2013 23:19:13 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:05 GMT