If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Need to get the offset in the node under the mouse cursor

VERIFIED FIXED in M7

Status

()

Core
Event Handling
P3
normal
VERIFIED FIXED
19 years ago
19 years ago

People

(Reporter: Akkana Peck, Assigned: joki (gone))

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

19 years ago
Events currently allow for getting the node under the event's (x,y) position,
but not the offset into that node.  We need a method in the event API to get the
offset into the node (e.g. if it's a text node).  This is needed for
middle-mouse paste and for some context menu issues.
(Reporter)

Updated

19 years ago
Blocks: 5380
(Reporter)

Comment 1

19 years ago
Adding dependency info.
(Reporter)

Updated

19 years ago
Target Milestone: M7
(Reporter)

Comment 2

19 years ago
Can we get this for M7, since the bug that depends on it is marked M7?

Tom, I can do this if you're overloaded.  The implementation shouldn't be hard,
I just need your OK to add the new API.
(Assignee)

Updated

19 years ago
Status: NEW → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
(Assignee)

Comment 3

19 years ago
Okay, you got it.  We now also reflect the event info as range endpoints.  Vidur
and I will look at standardizing this but until then if you were using
nsDOMUIEvent to get the info you'll need to get nsDOMNSUIEvent to get these.  Or
if you're in JS, it just works.  Anyway, new props are called

event.rangeParent
event.rangeOffset

Names may change at some point.
(Reporter)

Updated

19 years ago
Status: RESOLVED → VERIFIED
(Reporter)

Comment 4

19 years ago
I'll verify this since it's code-level -- works great, thanks, Tom!
You need to log in before you can comment on or make changes to this bug.