Bug 23605

Summary: positionForCoordinates() cursor placement does not match IE/FF
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: HTML EditingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: jparent, justin.garcia, ojan
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Bug Depends on: 23607    
Bug Blocks:    
Attachments:
Description Flags
test case (js only, needs to be in editing/selection/resources) none

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 ***