[Webkit-unassigned] [Bug 29249] document.caretRangeFromPoint() should return NULL if hit test on non text related node

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 14 16:38:38 PDT 2009


--- Comment #1 from Xiaomei Ji <xji at chromium.org>  2009-10-14 16:38:37 PDT ---
Created an attachment (id=41194)
 --> (https://bugs.webkit.org/attachment.cgi?id=41194)
behavior difference between Document.caretRangeFromPoint in webkit and
event.rangeOffset in FireFox

1. open the attached page
2. mouse click right before the first word "the" in the list, the container
node and offset in the range returned from caretRangeFromPoint() is the text
node "the first", and offset 0.
3. mouse click some where in the empty space around the bullet before "the
caretRangeFromPoint() returns the same as the above.

By comparison, open the above page in Firefox and repeat the above steps, you
will see the node and offset returned from event.rangeParent/rangeOffset in
FireFox are different if click on the text node and the element node.

Does webkit have anyway to tell the difference?
Seems that none of document.caretRangeFromPoint(), event.target, and
document.elementFromPoint() shows any difference in the above 2 clicks.

Should I apply for a new API for such differentiation?

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list