Bug 25153

Summary: Can't place the caret into text field that scrolls the window on focus
Product: WebKit Reporter: Justin Garcia <justin.garcia>
Component: FormsAssignee: Justin Garcia <justin.garcia>
Status: RESOLVED FIXED    
Severity: Normal CC: adele, bolsinga, mitz
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
test case
none
patch adele: review+

Justin Garcia
Reported 2009-04-12 23:30:11 PDT
Load the attached test case Click into the text field Text field is focused but selection isn't placed into the field <rdar://problem/6748324>
Attachments
test case (1.13 KB, text/html)
2009-04-12 23:32 PDT, Justin Garcia
no flags
patch (5.25 KB, patch)
2009-04-13 11:53 PDT, Justin Garcia
adele: review+
Justin Garcia
Comment 1 2009-04-12 23:32:38 PDT
Created attachment 29427 [details] test case
Justin Garcia
Comment 2 2009-04-13 00:08:30 PDT
The bug appears to be in handleMousePressEvent. There, we refetch the target node if it's a shadow node inside of a form field, see EventHandler.cpp:1156. In the test case, when we do that refetch we hit test with a bad document point. The document point is bad because it's generated from the window coordinate of the mouse click pre-scroll/zoom. the fix is to cache the document point before we dispatch the mouse event (since the window can scroll/zoom there).
Justin Garcia
Comment 3 2009-04-13 11:53:23 PDT
Justin Garcia
Comment 4 2009-04-13 14:14:05 PDT
Note You need to log in before you can comment on or make changes to this bug.