Bug 148981

Summary: Do not submit disabled option in combobox
Product: [Applications] konqueror Reporter: Maarten ter Huurne <maarten>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: browserbugs2
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Maarten ter Huurne 2007-08-19 01:57:15 UTC
Version:           3.5.7 (using KDE 3.5.7 "release 60.1" , openSUSE )
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.18.8-0.5-default

When a form contains the following combobox

<select name="configId">
<option disabled="disabled">(list is empty)</option>
</select>

and the form is submitted, "(list is empty)" is submitted as the value of "configId". I think "configId" should not be submitted.

The HTML4 spec is not entirely clear about this though. In 
17.13.2 it says:

Controls that are disabled cannot be successful.

And in 17.6.1 it says:

Only selected options will be successful (using the control name "component-select"). When no options are selected, the control is not successful and neither the name nor any values are submitted to the server when the form is submitted.

My interpretation of this is that a combobox is considered successful if it has at least one successful option and the <select> node is enabled. Therefore if the only option is disabled, no options are successful and therefore the combobox should be considered not successful, even if the <select> node is enabled.

Note that this bug is only about which controls should be submitted. Bug 76489 deals with handling of disabled options in the UI, which is a separate issue.
Comment 1 GĂ©rard Talbot (no longer involved) 2008-09-01 02:23:13 UTC
At webkit, there is a similar bug:
"A SELECT with a selected, disabled OPTION submits the disabled OPTION.
This results in the unsuccessful controls generating values in query strings
and invalid query strings"
https://bugs.webkit.org/show_bug.cgi?id=20184

Comment 2 Germain Garand 2009-06-03 08:51:01 UTC
SVN commit 976963 by ggarand:

match mozilla behaviour for select submission (and arguably html 4.01) :
selects must have a name and disabled options aren't supposed to be
submitted.

BUG: 148981


 M  +6 -2      html_formimpl.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=976963