<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>8660</bug_id>
          
          <creation_ts>2006-04-29 11:17:43 -0700</creation_ts>
          <short_desc>REGRESSION: Caret isn&apos;t inserted automatically after value of input element is set to null</short_desc>
          <delta_ts>2006-06-30 18:15:53 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>420+</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.remax.com/residential/property_search/index.aspx</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, Regression</keywords>
          <priority>P1</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Petersen">c.petersen87</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>adele</cc>
    
    <cc>darin</cc>
    
    <cc>ian</cc>
    
    <cc>justin.garcia</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>40722</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Petersen">c.petersen87</who>
    <bug_when>2006-04-29 11:17:43 -0700</bug_when>
    <thetext>I noticed when clicking in the Zip or City field, the caret isn&apos;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&apos;t present after this single click.

* RESULTS
The caret should be displayed but isn&apos;t

* REGRESSION
Yes, only occurs with TOT Webkit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40723</commentid>
    <comment_count>1</comment_count>
      <attachid>8035</attachid>
    <who name="Chris Petersen">c.petersen87</who>
    <bug_when>2006-04-29 11:18:32 -0700</bug_when>
    <thetext>Created attachment 8035
Reduced test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40724</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Petersen">c.petersen87</who>
    <bug_when>2006-04-29 11:20:35 -0700</bug_when>
    <thetext>Here&apos;s the snippet of HTML code that is used in the test case:

&lt;script language=&quot;javascript&quot;&gt;
	function DeleteDefaultText(ElementID) {
	var el = document.getElementById(ElementID);
	el.value = &apos;&apos;;
			}
	&lt;/script&gt;

  &lt;input value=&quot;City&quot; id=&quot;text&quot;  onclick=&quot;DeleteDefaultText(&apos;text&apos;);&quot; type=&quot;text&quot;&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40725</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Petersen">c.petersen87</who>
    <bug_when>2006-04-29 11:21:54 -0700</bug_when>
    <thetext>This issue is covered in &lt;rdar://problem/4531756&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>40765</commentid>
    <comment_count>4</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-04-29 20:43:58 -0700</bug_when>
    <thetext>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&apos;s node is deleted, or might find a way to do this that&apos;s specific to the input element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>44706</commentid>
    <comment_count>5</comment_count>
    <who name="Darin Adler">darin</who>
    <bug_when>2006-06-04 16:12:16 -0700</bug_when>
    <thetext>The symptom is now even worse. The text inside the input element is not erased until you click on the element.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47880</commentid>
    <comment_count>6</comment_count>
    <who name="Adele Peterson">adele</who>
    <bug_when>2006-06-30 18:15:53 -0700</bug_when>
    <thetext>This seems to be fixed now.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>8035</attachid>
            <date>2006-04-29 11:18:32 -0700</date>
            <delta_ts>2006-04-29 11:18:32 -0700</delta_ts>
            <desc>Reduced test case</desc>
            <filename>remax_reduced.html</filename>
            <type>text/html</type>
            <size>320</size>
            <attacher name="Chris Petersen">c.petersen87</attacher>
            
              <data encoding="base64">CjxodG1sPjxoZWFkPjx0aXRsZT5SRS9NQVg8L3RpdGxlPgoKPC9oZWFkPjxib2R5PgoKCTxzY3Jp
cHQgbGFuZ3VhZ2U9ImphdmFzY3JpcHQiPgoJCgkJCgoJCWZ1bmN0aW9uIERlbGV0ZURlZmF1bHRU
ZXh0KEVsZW1lbnRJRCkgewoJCQl2YXIgZWwgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChFbGVt
ZW50SUQpOwoJCQllbC52YWx1ZSA9ICcnOwoJCQkKCQkJCgkJfQoJPC9zY3JpcHQ+CgoKCgogIDxp
bnB1dCB2YWx1ZT0iQ2l0eSIgaWQ9InRleHQiICBvbmNsaWNrPSJEZWxldGVEZWZhdWx0VGV4dCgn
dGV4dCcpOyIgdHlwZT0idGV4dCI+PC9ib2R5PjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>