RESOLVED FIXED8660
REGRESSION: Caret isn't inserted automatically after value of input element is set to null
https://bugs.webkit.org/show_bug.cgi?id=8660
Summary REGRESSION: Caret isn't inserted automatically after value of input element i...
Chris Petersen
Reported 2006-04-29 11:17:43 PDT
I noticed when clicking in the Zip or City field, the caret isn't automatically inserted at the start of input field at http://www.remax.com/residential/property_search/index.aspx. It requires me to click a second time, to insert the caret. This is a regression since it works with a single click in Safari 2.0.3 without native text fields. I have reduced this page to a simple test case. * STEPS TO REPRODUCE 1. Open test case in TOT Webkit NB 2. Click in field 3. Notice the value is set to null in field but caret isn't present after this single click. * RESULTS The caret should be displayed but isn't * REGRESSION Yes, only occurs with TOT Webkit.
Attachments
Reduced test case (320 bytes, text/html)
2006-04-29 11:18 PDT, Chris Petersen
no flags
Chris Petersen
Comment 1 2006-04-29 11:18:32 PDT
Created attachment 8035 [details] Reduced test case
Chris Petersen
Comment 2 2006-04-29 11:20:35 PDT
Here's the snippet of HTML code that is used in the test case: <script language="javascript"> function DeleteDefaultText(ElementID) { var el = document.getElementById(ElementID); el.value = ''; } </script> <input value="City" id="text" onclick="DeleteDefaultText('text');" type="text">
Chris Petersen
Comment 3 2006-04-29 11:21:54 PDT
This issue is covered in <rdar://problem/4531756>
Darin Adler
Comment 4 2006-04-29 20:43:58 PDT
We understand why this happens -- the selection is in the text node, which is removed when you change the value to null. The trick is to figure out how to make this work. Might have to be a change to the SelectionController code that is invoked when the current selection's node is deleted, or might find a way to do this that's specific to the input element.
Darin Adler
Comment 5 2006-06-04 16:12:16 PDT
The symptom is now even worse. The text inside the input element is not erased until you click on the element.
Adele Peterson
Comment 6 2006-06-30 18:15:53 PDT
This seems to be fixed now.
Note You need to log in before you can comment on or make changes to this bug.