Version: (using Devel) Installed from: Compiled sources OS: Linux I have a disabled text input: <input id='foo' disabled='disabled' type='text' name='bar'> and a label for it: <label for='foo'>Foo</label> when i click on the text box, it will refuse to get the focus and its not writable(as expected).But if you click on its label, the text input will get the focus and you could write in it, which is bad because the textbox should be disabled and readonly. (first i thought its a oxygen style bug, but i tried id with plastique widget style too)
Using KDE 4.1.00 (KDE 4.1.0) (KDEmod) in ArchLinux i686: I can reproduce this bug with the "text" input and with the "textarea" tag.
I can also reproduce this bug using: Version 4.1.62 (KDE 4.1.62 (KDE 4.2 >= 20080814)) kdelibs4.2 svn rev.849324 kdebase4.2 svn rev.849337 ArchLinux 2.6.25-zen2-20080814 i686
This is actually a little more generic then that, since one can .focus() disabled things: <script> function test() { var inp = document.getElementById("inp"); inp.focus(); } </script> <body onload="test()"> <input id='inp' disabled='disabled' type='text'> ... so that needs fixing as well. I bet click() of a disabled button does something similar, too.
Oy, that's actually worse than I thought, since one can disable a focused element, etc. Needs further thought.
http://lists.kde.org/?l=kde-commits&m=121944099907587&w=2
Look at bug 177668 for another steps(testcase) to reproduce bugs using disabled controls and labels (3.5.10 and 4.1.80)
*** Bug 177668 has been marked as a duplicate of this bug. ***
SVN commit 926297 by sverberkt: Don't let labels fire click events on disabled objects. BUG:159682 M +1 -1 html_formimpl.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=926297
SVN commit 942329 by orlovich: Merged revision 926297:r926297 | sverberkt | 2009-02-14 19:28:49 -0500 (Sat, 14 Feb 2009) | 3 lines Don't let labels fire click events on disabled objects. BUG:159682 M +1 -1 html_formimpl.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=942329
SVN commit 1032808 by dfaure: Allow to focus readonly form elements (like other browsers do, partial revert of the commits for 159682), which makes it possible to copy their text, too (for tomj on irc). On the other hand, don't allow Ctrl+X and Ctrl+V to work in such widgets. Will backport for 4.3.3. BUG: 203069 CCBUG: 159682 M +1 -1 html/html_formimpl.cpp M +18 -12 khtml_ext.cpp M +2 -2 rendering/render_form.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1032808