| Summary: | [test case] form reset button doesn't reset the select list | ||
|---|---|---|---|
| Product: | [Applications] konqueror | Reporter: | José JORGE <lists.jjorge> |
| Component: | khtml forms | Assignee: | Konqueror Bugs <konqueror-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | CC: | info |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | test case | ||
|
Description
José JORGE
2006-08-31 12:01:52 UTC
The testcase on 30094 works for me on 3.5.4. Can you give us an example of a form where it fails? 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. Created attachment 17596 [details]
test case
Yeah, reset selects first one, FF & opera doesn't
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);
|