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

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

From: Sebastian Zartner <sebastianzartner@gmail.com>
Date: Tue, 25 Jun 2013 16:23:09 +0200
Message-ID: <CAERejNae3mP4o_+QHvD3DoNb90zUkfTfZny7zXzR856oNfF+tQ@mail.gmail.com>
To: www-style list <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
In bug 19753[1] I mentioned to add a plural version of
document.caretPositionFromPoint() besides the one for
document.elementFromPoint(),
so you can get the caret positions of all elements at a specific point.
Another idea was to add an element-specific function
caretPositionFromPoint()[2], which would take coordinates relative to the
given element.

Now I was asked for possible use cases for this function, though
unfortunately I can't remember if I had a good one.
One was related to having two overlapping text fields or areas used to
enable auto-completion like it's done for the Firebug Command Line. Though
there you don't necessarily need the position of the overlapped field.

So I'm asking around if somebody sees a need for such a function.

Sebastian

[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=19753
[2] http://lists.w3.org/Archives/Public/www-style/2012Oct/0702.html
Received on Tuesday, 25 June 2013 14:24:00 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:29 UTC