Bug 23605 - positionForCoordinates() cursor placement does not match IE/FF
Summary: positionForCoordinates() cursor placement does not match IE/FF
Status: RESOLVED DUPLICATE of bug 23607
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 23607
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-28 15:50 PST by Eric Seidel (no email)
Modified: 2009-02-13 11:27 PST (History)
3 users (show)

See Also:


Attachments
test case (js only, needs to be in editing/selection/resources) (4.07 KB, application/x-javascript)
2009-01-28 15:51 PST, Eric Seidel (no email)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2009-01-28 15:50:10 PST
positionForCoordinates() cursor placement does not match IE/FF

If you click above/blow a line of text in an editable region, we place the cursor at the start or end of that line.  FF and IE both do what Word/TextMate do, and place the cursor at the corresponding x offset in the line.  TextEdit matches our behavior and places the cursor at the end of the line.

In addition, we decided to test padding/margin behavior while here, and found that FF and IE and Safari all disagree:

// When clicking between divs separated by margins in an editable
// text region, the browsers differ in behavior:
// FF3: vertical padding box + some sort of overhang decent?
// IE6/IE7: vertical padding box
// IE8 b2: margin box
// Safari3: margin box (but cursor goes at end of line)

We've fully shaved the yak, and written the end-all-be-all of clicking test cases.  See attached.
Comment 1 Eric Seidel (no email) 2009-01-28 15:51:24 PST
Created attachment 27130 [details]
test case (js only, needs to be in editing/selection/resources)
Comment 2 Eric Seidel (no email) 2009-01-28 16:16:30 PST
This can be fixed at the same time as fixing bug 23607.
Comment 3 Eric Seidel (no email) 2009-02-13 11:27:02 PST
This will be fixed by bug 23607, duping.

*** This bug has been marked as a duplicate of 23607 ***