[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/khtml/html
From:       Andreas Kling <kling () impul ! se>
Date:       2006-09-01 11:28:19
Message-ID: 1157110099.153454.7967.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 579594 by kling:

Resetting a SELECT with no default selection should only jump to the first option if \
it'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 && m_size <= 1 ) {
         for (i = 0; i < itemsSize; ++i) {
             if (items[i]->id() == ID_OPTION) {
                 static_cast<HTMLOptionElementImpl*>(items[i])->setSelected(true);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic