Open Bug 826069 Opened 9 years ago Updated 3 years ago

caretPositionFromPoint returns different offset in empty iframe as the selection.focusOffset when clicking on it

Categories

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

x86
Windows 7
defect

Tracking

()

REOPENED

People

(Reporter: martijn.martijn, Unassigned)

References

()

Details

(Keywords: testcase)

See testcase, which is from bug 681387.


Clicking on the iframe results in:
clientX:152 clientY:164
selection.focusNode: [object HTMLPreElement] selection.focusOffset:0
selection.anchorNode: [object HTMLPreElement] selection.anchorOffset:0
caretpositionfrompoint.offsetNode:[object HTMLHtmlElement] caretpositionfrompoint.offset:0

caretpositionfrompoint.offsetNode should be equal to selection.focusNode, which is not the case here.
Component: DOM: Other → DOM
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Priority: -- → P5
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.