Open Bug 396393 Opened 17 years ago Updated 2 years ago

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

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

People

(Reporter: roc, Unassigned)

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.
Could just share this with event.rangeParent and event.parentOffset which does exactly that.
(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 )
Component: DOM: Mozilla Extensions → DOM
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
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.