Version: (using KDE KDE 3.2.0) Installed from: Unlisted Binary Package OS: Linux Adding the disabled property for the option element has no effect -- the option can still be selected. The HTML spec says this should not be allowed <http://www.w3.org/TR/html4/interact/forms.html#h-17.6>. For example: <select> <option>enabled</option> <option disabled>disabled</option> </select> allows both options to be selected (see test case). This appears to be a regression since a resolved bug #61347 talks about this previously being a problem when setting by script, yet now it doesn't work at all.
Created attachment 4955 [details] Test Case Only the first option should be selectable.
I just noticed that bug #61347 was not solely for javascript as I originally stated, but was the exact same bug I am reporting. I also see that it was resolved quite recently -- 2003-10-24. Is it possible that this fix is in head, but not in KDE 3.2, and this bug is therefore resolved also?
if you read #61347 exactly, it's about multiple selections. And there it indeed works
the reason it's not implemented for combo boxes is that it's simply not possible with QCombobox. And I'm not sure if this will ever be implemented ;(
*** Bug 93586 has been marked as a duplicate of this bug. ***
*** Bug 116109 has been marked as a duplicate of this bug. ***
Any hope to see this bug fixed (even if it need a qt patch) ?
Created attachment 19158 [details] Unfinished patch This is for KDE4, since it's using qt4 and its qabstractitemmodel. This patch makes "disabled" working for the combobox. The listbox is not yet ported, because KListBox still uses Q3ListBox, which is not qabstractitemmodel compliant. This patch also makes "disabled" working for optgroup (if an optgroup is disabled, all option children are disabled too). It's my first patch for kdelibs, and khtml in particular, so i'm not sure it's the good way, especially about the location (the owner and the name) of the SelectModel class. Any comments are welcomed :-)
Created attachment 20493 [details] Fix option and optgroup This is a possible finished patch (for combobox and listbox). Any comments are welcomed.
Cool stuff. Too bad I don't know anything about the MV stuff in Qt4...
Unfortunately, KListWidget inherits QListWidget which makes setModel() method private :-( So we can't apply the SelectModel to the listbox (which means there is some duplicated code/logic). Will we have a kdeified QListView (then we'll be able to put a SelectModel)? Else, i think some "if (m_useListBox)" could be removed to clean the code a bit, since a big part of updateFromElement() applied only for the listbox now.
Internet Explorer 8 beta 2 which was released 2 days ago now supports option disabled. Testcase: http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/OptionDisabledSupport.html There is also a bug entry at bugs.webkit.org to harmonize the way disabled option work in an expanded select in modern and web-standards-compliant browsers: https://bugs.webkit.org/show_bug.cgi?id=18358 Regards, Gérard
Created attachment 31529 [details] Patch updated for trunk
Created attachment 31530 [details] Patch for trunk Updated earlier patch for trunk and applied some cosmetic changes.
I have filed bug 197452 for <optgroup disabled> support and requested to have it marked as dependent of this bug. regards, Gérard
SVN commit 1111139 by orlovich: - Fix inheritance of disabled from optgroup - Actually show stuff as properly disabled in listbox mode ... Let's see if combos can be convinced w/o going nuts BUG: 197452 CCBUG: 76489 M +18 -5 render_form.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1111139
SVN commit 1111163 by orlovich: Fix disabling of optgroups/options in combobx mode as well (also making it unselectable in that mode). Seems to be nearly perfect, except for not skipping the disabled items when chosing defaults. CCBUG: 76489 M +34 -34 render_form.cpp M +2 -0 render_form.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1111163
When I try http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/OptionDisabledSupport.html and http://www.gtalbot.org/BrowserBugsSection/Konqueror4Bugs/optgroup-disabled.html I get expected results with Konqueror 4.5.1 and Konqueror 4.5.3 (Qt: 4.7.0). Thank you Maksim! :) Dominic, I can not resolve as FIXED this bug report... but you can! regards, Gérard
Resolving as FIXED