RESOLVED FIXED 25153
Can't place the caret into text field that scrolls the window on focus
https://bugs.webkit.org/show_bug.cgi?id=25153
Summary Can't place the caret into text field that scrolls the window on focus
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.