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

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>133326</bug_id>
          
          <creation_ts>2006-08-31 12:01:52 +0000</creation_ts>
          <short_desc>[test case] form reset button doesn&apos;t reset the select list</short_desc>
          <delta_ts>2006-09-01 13:28:36 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konqueror</product>
          <component>khtml forms</component>
          <version>unspecified</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="José JORGE">lists.jjorge</reporter>
          <assigned_to name="Konqueror Bugs">konqueror-bugs-null</assigned_to>
          <cc>info</cc>
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>465210</commentid>
    <comment_count>0</comment_count>
    <who name="José JORGE">lists.jjorge</who>
    <bug_when>2006-08-31 12:01:52 +0000</bug_when>
    <thetext>Version:           3.5.4 (using KDE 3.5.4, Debian Package 4:3.5.4-3 (testing/unstable))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.17-2-686

This is as the old bug 30094, but as I couldn&apos;t re-open it...

Please look at this bug to description.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>465222</commentid>
    <comment_count>1</comment_count>
    <who name="Andreas Kling">info</who>
    <bug_when>2006-08-31 12:56:28 +0000</bug_when>
    <thetext>The testcase on 30094 works for me on 3.5.4. Can you give us an example of a form where it fails?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>465486</commentid>
    <comment_count>2</comment_count>
    <who name="José JORGE">lists.jjorge</who>
    <bug_when>2006-09-01 08:28:29 +0000</bug_when>
    <thetext>My test case is a form with no selected item, so the first one is selected.
Then select anything. Reset should come back to the first one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>465496</commentid>
    <comment_count>3</comment_count>
      <attachid>17596</attachid>
    <who name="Tommi Tervo">tommi.tervo</who>
    <bug_when>2006-09-01 09:39:31 +0000</bug_when>
    <thetext>Created attachment 17596
test case

Yeah, reset selects first one, FF &amp; opera doesn&apos;t</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>465565</commentid>
    <comment_count>4</comment_count>
    <who name="Andreas Kling">info</who>
    <bug_when>2006-09-01 13:28:35 +0000</bug_when>
    <thetext>SVN commit 579594 by kling:

Resetting a SELECT with no default selection should only jump to the first option if it&apos;s a single-row list.

BUG: 133326


 M  +2 -2      html_formimpl.cpp  


--- branches/KDE/3.5/kdelibs/khtml/html/html_formimpl.cpp #579593:579594
@@ -2428,8 +2428,8 @@
                 anySelected = true;
         }
     }
-    // If there is no default selection, jump to first option.
-    if ( !anySelected ) {
+    // If this is a single-row SELECT and there is no default selection, jump to first option.
+    if ( !anySelected &amp;&amp; m_size &lt;= 1 ) {
         for (i = 0; i &lt; itemsSize; ++i) {
             if (items[i]-&gt;id() == ID_OPTION) {
                 static_cast&lt;HTMLOptionElementImpl*&gt;(items[i])-&gt;setSelected(true);
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>17596</attachid>
            <date>2006-09-01 09:39:31 +0000</date>
            <delta_ts>2006-09-01 09:39:31 +0000</delta_ts>
            <desc>test case</desc>
            <filename>133326.html</filename>
            <type>text/html</type>
            <size>136</size>
            <attacher name="Tommi Tervo">tommi.tervo</attacher>
            
              <data encoding="base64">PGh0bWw+Cjxmb3JtPiAKIDxzZWxlY3Qgc2l6ZT0iMyI+IAogPG9wdGlvbj5mb28gCiA8b3B0aW9u
PmZvbyBiYXIgCiA8b3B0aW9uPmZvbyAyIAogPC9zZWxlY3Q+IAogPGlucHV0IHR5cGU9InJlc2V0
Ij4gCiA8L2Zvcm0+IAo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>