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

Re: [cssom-view] Is there a need for a plural form of document.caretPositionFromPoint()?

From: Simon Pieters <simonp@opera.com>
Date: Wed, 26 Jun 2013 15:08:58 +0200
To: "Sebastian Zartner" <sebastianzartner@gmail.com>, "Scott Johnson" <sjohnson@mozilla.com>, "Alan Stearns" <stearns@adobe.com>
Cc: "www-style list" <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
Message-ID: <op.wzaes8lnidj3kv@simons-macbook-pro.local>
On Tue, 25 Jun 2013 18:16:58 +0200, Alan Stearns <stearns@adobe.com> wrote:

> Sebastian,
>
> One of the use cases for elementsFromPoint was where you're trying to
> determine a drop target, but elementFromPoint() is returning the item to
> be dropped (since it's the top thing under the cursor). If you want to
> have the caret position from an obscured drop target, it would be useful
> to have caretPositionsFromPoint().

It seems a bit unlikely that there would be multiple input widgets  
overlapping each other, though. Finding a caret position that is obscured  
by another element seems plausible. It could be solved by adding a flag to  
caretPositionFromPoint() to cut through the layers and return the top-most  
caret position, if there is one.

Are there any examples of this being a problem that people run into and  
work around?

-- 
Simon Pieters
Opera Software
Received on Wednesday, 26 June 2013 13:07:21 UTC

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