
Some parts of this message have been removed.
Learn more about Nabble's
security policy.
I am usingĀ caretRangeFromPoint to convert mouse position to the character position within an element.
I am trying to use it to achieve the same behavior as event.rangeParent and event.rangeOffset in FireFox. So I think it should return different results if hit test on a text node or the text node's parent element whose first child is the text node.
But the behavior of Document.caretRangeFromPoint() is different.
I attached a test case in this email. Following are the steps to show the difference:
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.
document.elementFromPoint() Method
the first
the second
_______________________________________________
webkit-dev mailing list
webkit-dev@...
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev