<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>165607</bug_id>
          
          <creation_ts>2008-07-03 03:42:59 +0000</creation_ts>
          <short_desc>text input onchange event never gets called [testcase???]</short_desc>
          <delta_ts>2008-10-18 18:39:16 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>konqueror</product>
          <component>general</component>
          <version>unspecified</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Radu Benea">kitanatahu</reporter>
          <assigned_to name="Konqueror Bugs">konqueror-bugs-null</assigned_to>
          
          
          <cf_commitlink></cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>619534</commentid>
    <comment_count>0</comment_count>
    <who name="Radu Benea">kitanatahu</who>
    <bug_when>2008-07-03 03:42:59 +0000</bug_when>
    <thetext>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=&quot;text&quot; the onchange=&quot;whatever()&quot; is ignored in current konqueror/khtml/kjs
in other words function whatever() never gets called
hope this was clear enough</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619535</commentid>
    <comment_count>1</comment_count>
      <attachid>25802</attachid>
    <who name="Radu Benea">kitanatahu</who>
    <bug_when>2008-07-03 03:44:48 +0000</bug_when>
    <thetext>Created attachment 25802
very simple test case proving the bug

hope this gets fixed before 4.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619536</commentid>
    <comment_count>2</comment_count>
    <who name="Radu Benea">kitanatahu</who>
    <bug_when>2008-07-03 03:51:03 +0000</bug_when>
    <thetext>just a little reformulation, none of the inputs care about onchange event</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619827</commentid>
    <comment_count>3</comment_count>
    <who name="A. Spehr">zahl</who>
    <bug_when>2008-07-03 21:38:28 +0000</bug_when>
    <thetext>Er, can you explain how this testcase is supposed to work? When I load it, the textbox says &quot;it works&quot;, 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 &amp; 4.00.84

The current testcase: 

&lt;html&gt;
	&lt;head&gt;
		&lt;title&gt;Input not working demo&lt;/title&gt;
	&lt;/head&gt;
	&lt;body&gt;
		&lt;input type=&quot;text&quot; value=&quot;it works!&quot; onchange=&quot;alert(this.value)&quot;&gt;
	&lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619839</commentid>
    <comment_count>4</comment_count>
    <who name="A. Spehr">zahl</who>
    <bug_when>2008-07-03 22:42:32 +0000</bug_when>
    <thetext>Furthermore, it works the same way in iceweasel.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619880</commentid>
    <comment_count>5</comment_count>
    <who name="Radu Benea">kitanatahu</who>
    <bug_when>2008-07-04 01:14:20 +0000</bug_when>
    <thetext>doesn&apos;t work in kde svn... at least not in my build and it&apos;s less than 2 days old, the message never pops up, ever</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619881</commentid>
    <comment_count>6</comment_count>
    <who name="Radu Benea">kitanatahu</who>
    <bug_when>2008-07-04 01:15:26 +0000</bug_when>
    <thetext>and yes, the way you experienced it was the expected behaviour</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619885</commentid>
    <comment_count>7</comment_count>
    <who name="Radu Benea">kitanatahu</who>
    <bug_when>2008-07-04 01:22:07 +0000</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619901</commentid>
    <comment_count>8</comment_count>
    <who name="A. Spehr">zahl</who>
    <bug_when>2008-07-04 03:44:10 +0000</bug_when>
    <thetext>So it works fine for me? 

ok, i&apos;m r826995 kdelibs atm. Last changed according to svn info: 2008-07-01
I have no clue why it wouldn&apos;t work for you...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>619958</commentid>
    <comment_count>9</comment_count>
    <who name="Radu Benea">kitanatahu</who>
    <bug_when>2008-07-04 09:36:35 +0000</bug_when>
    <thetext>So, here it is... the real problem, seems I&apos;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=&quot;checkbox&quot; or type=&quot;radiobutton&quot; it should work when using the mouse to change the checked state - without it needing to lose focus and this case also doesn&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>620118</commentid>
    <comment_count>10</comment_count>
    <who name="Jaime Torres">jtamate</who>
    <bug_when>2008-07-04 16:27:38 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>655023</commentid>
    <comment_count>11</comment_count>
    <who name="Maksim Orlovich">maksim</who>
    <bug_when>2008-10-18 18:37:34 +0000</bug_when>
    <thetext>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&apos;s previous fix this covers 
#165607, #170451. This also doesn&apos;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&amp;revision=873059
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>655026</commentid>
    <comment_count>12</comment_count>
    <who name="Maksim Orlovich">maksim</who>
    <bug_when>2008-10-18 18:39:16 +0000</bug_when>
    <thetext>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&apos;s previous fix this covers 
#165607, #170451. This also doesn&apos;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&amp;revision=873060
</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>25802</attachid>
            <date>2008-07-03 03:44:48 +0000</date>
            <delta_ts>2008-07-03 03:44:48 +0000</delta_ts>
            <desc>very simple test case proving the bug</desc>
            <filename>verysimpletest.html</filename>
            <type>text/html</type>
            <size>158</size>
            <attacher name="Radu Benea">kitanatahu</attacher>
            
              <data encoding="base64">PGh0bWw+Cgk8aGVhZD4KCQk8dGl0bGU+SW5wdXQgbm90IHdvcmtpbmcgZGVtbzwvdGl0bGU+Cgk8
L2hlYWQ+Cgk8Ym9keT4KCQk8aW5wdXQgdHlwZT0idGV4dCIgdmFsdWU9Iml0IHdvcmtzISIgb25j
aGFuZ2U9ImFsZXJ0KHRoaXMudmFsdWUpIj4KCTwvYm9keT4KPC9odG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>