Bug 18123

Summary: Position of dynamically inserted content in DIV with contenteditable=true seems to vary randomly
Product: WebKit Reporter: Robbie Paplin <rpaplin>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Major CC: vicki, webkit
Priority: P2 Keywords: InRadar
Version: 525.x (Safari 3.1)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Test case to obtain Range's offsetTop & offsetLeft position none

Robbie Paplin
Reported 2008-03-26 14:31:38 PDT
What we are attempting to do here is emulate the ability that Internet Explorer has to get the offsetTop & offsetLeft of a TextRange. As you are aware the Range object that Safari & Firefox implement does not have offsetTop & offsetLeft properties. In order to obtain this information, we temporarily insert a SPAN into a Range, calculate the offsetTop & offsetLeft properties of the newly inserted SPAN, and then remove the SPAN from our Range. BTW - If you know of a better way to get the approximate offsetTop & offsetLeft position of range, let us know.
Attachments
Test case to obtain Range's offsetTop & offsetLeft position (4.80 KB, text/html)
2008-03-26 14:34 PDT, Robbie Paplin
no flags
Robbie Paplin
Comment 1 2008-03-26 14:34:17 PDT
Created attachment 20099 [details] Test case to obtain Range's offsetTop & offsetLeft position Issue occurs on both Windows & Macintosh platforms
Vicki Murley
Comment 2 2008-03-27 10:16:52 PDT
Robert Blaut
Comment 3 2008-07-30 02:38:19 PDT
Confirmed issue in the latest WebKit r35417 for Mac OS X.
Note You need to log in before you can comment on or make changes to this bug.