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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>14443</bug_id>
          
          <creation_ts>2007-06-27 22:25:58 -0700</creation_ts>
          <short_desc>Forms dont submit when disabling submit button</short_desc>
          <delta_ts>2012-03-16 01:25:56 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Forms</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.4</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://gifts.30boxes.com/broken.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>39021</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Zachary Allia">allia.z</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>darren</cc>
    
    <cc>dglazkov</cc>
    
    <cc>kaustubh.ra</cc>
    
    <cc>rniwa</cc>
    
    <cc>rsesek</cc>
    
    <cc>tkent</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>6011</commentid>
    <comment_count>0</comment_count>
    <who name="Zachary Allia">allia.z</who>
    <bug_when>2007-06-27 22:25:58 -0700</bug_when>
    <thetext>Forms do not submit when disabling the submit button via an onclick event, even when returning true.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4323</commentid>
    <comment_count>1</comment_count>
      <attachid>15579</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-19 05:32:20 -0700</bug_when>
    <thetext>Created attachment 15579
test case</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4325</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2007-07-19 05:33:48 -0700</bug_when>
    <thetext>Confirmed with r24182. Works in Firefox.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89006</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Sesek">rsesek</who>
    <bug_when>2008-08-21 08:43:15 -0700</bug_when>
    <thetext>This is a regression from fixing https://bugs.webkit.org/show_bug.cgi?id=9245. Not sure how to go about fixing this, though...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89830</commentid>
    <comment_count>4</comment_count>
    <who name="Gérard Talbot (no longer involved)">browserbugs2</who>
    <bug_when>2008-08-31 17:12:02 -0700</bug_when>
    <thetext>This bug seems to be the exact opposite of bug 16886. You guys should be talking to each others to sort this out because both bugs can not be confirmed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>473863</commentid>
    <comment_count>5</comment_count>
    <who name="Kaustubh Atrawalkar">kaustubh.ra</who>
    <bug_when>2011-09-27 05:12:52 -0700</bug_when>
    <thetext>This seems to be old but existing issue. During initial implementation of SubmitInputType::handleDOMActivateEvent (revision - 72059 -http://trac.webkit.org/changeset/72059/trunk/WebCore/html/SubmitInputType.cpp)

There was check added to see if submitButton-&gt;disabled() but this line will never hit infact the function will not be called if the button is disabled. In the use case, the onclick script it handled first making the button disabled and then continued to handleDOMActivateEvent where it returns due to disabled submitButton. Should be removed that check. Attaching patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>473976</commentid>
    <comment_count>6</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-09-27 09:18:33 -0700</bug_when>
    <thetext>Does IE submit in this case?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>474058</commentid>
    <comment_count>7</comment_count>
    <who name="Kaustubh Atrawalkar">kaustubh.ra</who>
    <bug_when>2011-09-27 10:39:16 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Does IE submit in this case?

Nope. only Firefox has does complete form submission.
MSIE &amp; Opera does not. I think we might need to clear out again about this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>474064</commentid>
    <comment_count>8</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-09-27 10:45:19 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; Does IE submit in this case?
&gt; 
&gt; Nope. only Firefox has does complete form submission.
&gt; MSIE &amp; Opera does not. I think we might need to clear out again about this.

Yes, we definitely need to figure out the right behavior on whatwg. Intuitively, I wouldn&apos;t expect the form to submit when the only submit button is disabled. This may as well as considered as a Gecko bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>474072</commentid>
    <comment_count>9</comment_count>
    <who name="Kaustubh Atrawalkar">kaustubh.ra</who>
    <bug_when>2011-09-27 10:52:37 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; &gt; (In reply to comment #6)
&gt; &gt; &gt; Does IE submit in this case?
&gt; &gt; 
&gt; &gt; Nope. only Firefox has does complete form submission.
&gt; &gt; MSIE &amp; Opera does not. I think we might need to clear out again about this.
&gt; 
&gt; Yes, we definitely need to figure out the right behavior on whatwg. Intuitively, I wouldn&apos;t expect the form to submit when the only submit button is disabled. This may as well as considered as a Gecko bug.

If you suggest, I will mail on whatwg for this issue. IMHO, until and unless form submit is not disabled, form submit action should happen on the click. But not sure with the compatibility of the browsers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>474091</commentid>
    <comment_count>10</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-09-27 11:11:47 -0700</bug_when>
    <thetext>By the way, could you add yourself to committers.py so that Bugzilla&apos;s auto-completion can recognize you. Also, listing your IRC nick name will allow me to talk to you on #webkit more easily :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>474100</commentid>
    <comment_count>11</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2011-09-27 11:17:52 -0700</bug_when>
    <thetext>ap suggests I add you myself. What&apos;s your IRC nickname?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>474103</commentid>
    <comment_count>12</comment_count>
    <who name="Kaustubh Atrawalkar">kaustubh.ra</who>
    <bug_when>2011-09-27 11:21:39 -0700</bug_when>
    <thetext>(In reply to comment #11)
&gt; ap suggests I add you myself. What&apos;s your IRC nickname?

Sure, my IRC nickname is silverroots</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>474564</commentid>
    <comment_count>13</comment_count>
    <who name="Kaustubh Atrawalkar">kaustubh.ra</who>
    <bug_when>2011-09-28 00:22:42 -0700</bug_when>
    <thetext>(In reply to comment #12)
&gt; (In reply to comment #11)
&gt; &gt; ap suggests I add you myself. What&apos;s your IRC nickname?
&gt; 
&gt; Sure, my IRC nickname is silverroots

Thanks Ryosuke :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>475868</commentid>
    <comment_count>14</comment_count>
    <who name="Kaustubh Atrawalkar">kaustubh.ra</who>
    <bug_when>2011-09-29 21:06:32 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; 
&gt; Yes, we definitely need to figure out the right behavior on whatwg. Intuitively, I wouldn&apos;t expect the form to submit when the only submit button is disabled. This may as well as considered as a Gecko bug.

in this case, the submit button is active before clicking it, but on it&apos;s on click handler it is made disabled. Firefox seems to run both on click and on submit handlers in this case one followed by another.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>573615</commentid>
    <comment_count>15</comment_count>
    <who name="Kaustubh Atrawalkar">kaustubh.ra</who>
    <bug_when>2012-03-07 22:21:45 -0800</bug_when>
    <thetext>The whatwg discussion thread - http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2012-January/034536.html

As per Ian, we should be fixing this issue. Will provide a patch soon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>580199</commentid>
    <comment_count>16</comment_count>
    <who name="Darren Powers">darren</who>
    <bug_when>2012-03-15 23:52:03 -0700</bug_when>
    <thetext>I seems to be having the same problem with links.
On click event if I disable the link I would still expect the event to bubble and route the browser to the href value but nothing happens.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>580275</commentid>
    <comment_count>17</comment_count>
    <who name="Kaustubh Atrawalkar">kaustubh.ra</who>
    <bug_when>2012-03-16 01:25:56 -0700</bug_when>
    <thetext>(In reply to comment #16)
&gt; I seems to be having the same problem with links.
&gt; On click event if I disable the link I would still expect the event to bubble and route the browser to the href value but nothing happens.

Yes, this might have issues with most of the elements. I am assuming handleDOMActiveEvent should be modified to make it more smarter so that it can handle such cases. Not sure thought.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>15579</attachid>
            <date>2007-07-19 05:32:20 -0700</date>
            <delta_ts>2007-07-19 05:32:20 -0700</delta_ts>
            <desc>test case</desc>
            <filename>disable-submit.html</filename>
            <type>text/html</type>
            <size>117</size>
            <attacher name="Alexey Proskuryakov">ap</attacher>
            
              <data encoding="base64">PGZvcm0gYWN0aW9uPSJqYXZhc2NyaXB0OmFsZXJ0KCdTVUNDRVNTJykiPgo8aW5wdXQgdHlwZT0i
c3VibWl0IiBvbmNsaWNrPSJ0aGlzLmRpc2FibGVkPXRydWU7IHJldHVybiB0cnVlOyI+CjwvZm9y
bT4K
</data>

          </attachment>
      

    </bug>

</bugzilla>