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

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 UTC