<?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>8114</bug_id>
          
          <creation_ts>2006-03-31 17:05:51 -0800</creation_ts>
          <short_desc>select method doesn&apos;t highlight text field contents for onclick</short_desc>
          <delta_ts>2022-07-06 13:41:16 -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>DOM</component>
          <version>417.x</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bakafish">jason</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>emark2k</cc>
    
    <cc>ian</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>38133</commentid>
    <comment_count>0</comment_count>
    <who name="Bakafish">jason</who>
    <bug_when>2006-03-31 17:05:51 -0800</bug_when>
    <thetext>object.select() should highlight and select the contents of the (text field) object according to the DOM. This doesn&apos;t seem to happen, the object gets focus, but the contents are not selected.

Example code:

&lt;html&gt;
&lt;head&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function selText() {
   document.getElementById(&quot;myText&quot;).select()
}
&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;form&gt;
   &lt;input size=&quot;40&quot; type=&quot;text&quot; id=&quot;myText&quot; value=&quot;A cat played with a ball in the garden&quot;&gt;
   &lt;input type=&quot;button&quot; value=&quot;Select text&quot; onclick=&quot;selText()&quot;&gt; 
&lt;/form&gt;
&lt;/body&gt;

&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38221</commentid>
    <comment_count>1</comment_count>
      <attachid>7450</attachid>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-04-01 15:51:03 -0800</bug_when>
    <thetext>Created attachment 7450
Test from Comment #0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38222</commentid>
    <comment_count>2</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-04-01 15:52:13 -0800</bug_when>
    <thetext>Confirmed on Safari 2.0.3 (417.9.2) on Mac OS X 10.4.5 (8H14).
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38223</commentid>
    <comment_count>3</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2006-04-01 15:54:01 -0800</bug_when>
    <thetext>However, this bug has been fixed on ToT as of (at least) r13607 (built locally).  Therefore, closing as RESOLVED/FIXED.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>38412</commentid>
    <comment_count>4</comment_count>
    <who name="Bakafish">jason</who>
    <bug_when>2006-04-03 12:50:19 -0700</bug_when>
    <thetext>Okay, one behavior is fixed, however it still fails in another example. If the textfield element is clicked to obtain focus or the event is set on the onClick (or indirectly the onFocus fired by a click derived focus event) handler the text is selected then the cursor steals the select behavior and the text is no longer selected.

Example code 2:

&lt;html&gt;
&lt;head&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function selText() {
   document.getElementById(&quot;myText&quot;).select()
}
&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;form&gt;
   &lt;input size=&quot;40&quot; type=&quot;text&quot; id=&quot;myText&quot; value=&quot;A cat played with a ball in
the garden&quot; onclick=&quot;selText()&quot;&gt;
&lt;/form&gt;
&lt;/body&gt;

&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9671</commentid>
    <comment_count>5</comment_count>
    <who name="Mark">emark2k</who>
    <bug_when>2007-05-18 10:27:18 -0700</bug_when>
    <thetext>I&apos;ve looked for an appropriate place to put this, and not sure if it merits a separate thread so I&apos;ll start here as they may be related:  

sometimes, when I open a new Firefox window after using it for a while (still w/ tons of free real memory and now pageouts on a 2 GB RAM machine) I am unable to hit the TAB key to select and enter text into the Search Engine entry area.

There is a greyed-out indicator of the Search Engine default in the area that is supposed to dissapear when the cursor gets there.  Instead the word &quot;Google&quot; in this case remains and the subsequent typing/text entry ends up being appended to the word Google, then you can&apos;t enter.  Trying Cmd-A for &quot;select all&quot; in os x, or trying deleting all the text doesn&apos;t work either....after entering the text the Enter key is still not functional.

Closing the window and opening another doesn&apos;t usually help...when it gets to this state you need to quit and restart...

I&apos;ve reached this problem several times, but it is infrequent and not easy to test for someone of my skill level/background.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9620</commentid>
    <comment_count>6</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-05-18 23:17:30 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; I&apos;ve looked for an appropriate place to put this, and not sure if it merits a
&gt; separate thread so I&apos;ll start here as they may be related:  
&gt; 
&gt; sometimes, when I open a new Firefox window after using it for a while (still
&gt; w/ tons of free real memory and now pageouts on a 2 GB RAM machine) I am unable
&gt; to hit the TAB key to select and enter text into the Search Engine entry area.

Mark, if this is really a Firefox bug, you want to use:  http://bugzilla.mozilla.org/

I suggest using this page to create a new bug (after you create an account):  https://bugzilla.mozilla.org/enter_bug.cgi

Please note that http://bugs.webkit.org/ is for Apple&apos;s Safari web browser.  Thanks!

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9621</commentid>
    <comment_count>7</comment_count>
    <who name="David Kilzer (:ddkilzer)">ddkilzer</who>
    <bug_when>2007-05-18 23:18:08 -0700</bug_when>
    <thetext>Mark, please see Comment #6.

</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>7450</attachid>
            <date>2006-04-01 15:51:03 -0800</date>
            <delta_ts>2006-04-01 15:51:03 -0800</delta_ts>
            <desc>Test from Comment #0</desc>
            <filename>bug-8144-test.html</filename>
            <type>text/html</type>
            <size>331</size>
            <attacher name="David Kilzer (:ddkilzer)">ddkilzer</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgo8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+CmZ1bmN0aW9uIHNl
bFRleHQoKSB7CiAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCJteVRleHQiKS5zZWxlY3QoKQp9
Cjwvc2NyaXB0Pgo8L2hlYWQ+Cgo8Ym9keT4KPGZvcm0+CiAgIDxpbnB1dCBzaXplPSI0MCIgdHlw
ZT0idGV4dCIgaWQ9Im15VGV4dCIgdmFsdWU9IkEgY2F0IHBsYXllZCB3aXRoIGEgYmFsbCBpbgp0
aGUgZ2FyZGVuIj4KICAgPGlucHV0IHR5cGU9ImJ1dHRvbiIgdmFsdWU9IlNlbGVjdCB0ZXh0IiBv
bmNsaWNrPSJzZWxUZXh0KCkiPiAKPC9mb3JtPgo8L2JvZHk+Cgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>