Bug 18123 - Position of dynamically inserted content in DIV with contenteditable=true seems to vary randomly
Summary: Position of dynamically inserted content in DIV with contenteditable=true see...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: All All
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2008-03-26 14:31 PDT by Robbie Paplin
Modified: 2008-07-30 02:38 PDT (History)
2 users (show)

See Also:


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 Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robbie Paplin 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.
Comment 1 Robbie Paplin 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
Comment 2 Vicki Murley 2008-03-27 10:16:52 PDT
<rdar://problem/5825391>
Comment 3 Robert Blaut 2008-07-30 02:38:19 PDT
Confirmed issue in the latest WebKit r35417 for Mac OS X.