Version: (using Devel) Installed from: Compiled sources Compiler: gcc 4.3.1 gcc (Gentoo 4.3.1 p1.0) 4.3.1 OS: Linux on inputs with type="text" the onchange="whatever()" is ignored in current konqueror/khtml/kjs in other words function whatever() never gets called hope this was clear enough
Created attachment 25802 [details] very simple test case proving the bug hope this gets fixed before 4.1
just a little reformulation, none of the inputs care about onchange event
Er, can you explain how this testcase is supposed to work? When I load it, the textbox says "it works", but....? I can then type in the box, hit return, and an alert box pops up with whatever I typed in. Is that the expected behavior? It does that in both 3.5.9 & 4.00.84 The current testcase: <html> <head> <title>Input not working demo</title> </head> <body> <input type="text" value="it works!" onchange="alert(this.value)"> </body> </html>
Furthermore, it works the same way in iceweasel.
doesn't work in kde svn... at least not in my build and it's less than 2 days old, the message never pops up, ever
and yes, the way you experienced it was the expected behaviour
I keep forgetting to state something... it is a 4.1 prerelease svn build from gentoo overlay, I made sure I updated kdelibs, kdepimlibs, libkonq and konqueror - could it be that I missed some required update?
So it works fine for me? ok, i'm r826995 kdelibs atm. Last changed according to svn info: 2008-07-01 I have no clue why it wouldn't work for you...
So, here it is... the real problem, seems I'm pretty slow at this... updated to latest sources When testing the way you did it works BUT It should also work by changing the input contents and using the mouse to click somewhere other than the input (to make it lose focus) - and this case does not work. Also, if you change input to type="checkbox" or type="radiobutton" it should work when using the mouse to change the checked state - without it needing to lose focus and this case also doesn't seem to work. Sorry for all the confusion I created due to my previous posts, please let me know if this is reproducible with your build.
I agree with Radu, this only works when the control loses the input focus by pressing Enter, not by clicking elsewhere. Tested in r825239 What should do the event is defined in: http://www.w3.org/TR/REC-html40/interact/scripts.html onchange = script [CT] The onchange event occurs when a control loses the input focus and its value has been modified since gaining focus. This attribute applies to the following elements: INPUT, SELECT, and TEXTAREA.
SVN commit 873059 by orlovich: Rework how we do onchange for input/checkboxes, unbreaking it and simplifying things. As we only want to fire it in response to user events, this just does it in defaultEventHandler. Fixes kde-look wallaper settings, and along with Germain's previous fix this covers #165607, #170451. This also doesn't suffer from #148118 BUG:148118 BUG:165607 BUG:170451 M +8 -0 html/html_formimpl.cpp M +1 -12 rendering/render_form.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=873059
SVN commit 873060 by orlovich: Merged revision 873059: Rework how we do onchange for input/checkboxes, unbreaking it and simplifying things. As we only want to fire it in response to user events, this just does it in defaultEventHandler. Fixes kde-look wallaper settings, and along with Germain's previous fix this covers #165607, #170451. This also doesn't suffer from #148118 BUG:148118 BUG:165607 BUG:170451 M +8 -0 html/html_formimpl.cpp M +1 -12 rendering/render_form.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=873060