Support something like elementFromPoint (rangeFromPoint?) that returns a range instead

NEW
Unassigned

Status

()

P5
normal
11 years ago
4 months ago

People

(Reporter: roc, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

People writing editing code need this, apparently. Basically I think the need is to figure out from x/y coordinates which character(s) of text are targeted.

So we really just need to return an element or node plus an offset. Returning a collapsed DOM Range seems like a reasonable way to do it.

Comment 1

11 years ago
Could just share this with event.rangeParent and event.parentOffset which does exactly that.

Comment 2

11 years ago
(In reply to comment #1)
> Could just share this with event.rangeParent and event.parentOffset which does
> exactly that.
> 

rangeParent and rangeOffset that is.
Oh, I didn't know about those.

What do you mean by "share"?
This sounds a lot like bug 654352 ( document.caretPositionFromPoint API )
(Assignee)

Updated

6 years ago
Component: DOM: Mozilla Extensions → DOM
Product: Core → Core
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.