Summary: | Forms dont submit when disabling submit button | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Zachary Allia <allia.z> | ||||
Component: | Forms | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | NEW --- | ||||||
Severity: | Normal | CC: | ap, darren, dglazkov, kaustubh.ra, rniwa, rsesek, tkent | ||||
Priority: | P2 | ||||||
Version: | 523.x (Safari 3) | ||||||
Hardware: | Mac | ||||||
OS: | OS X 10.4 | ||||||
URL: | http://gifts.30boxes.com/broken.html | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 39021 | ||||||
Attachments: |
|
Description
Zachary Allia
2007-06-27 22:25:58 PDT
Created attachment 15579 [details]
test case
This is a regression from fixing https://bugs.webkit.org/show_bug.cgi?id=9245. Not sure how to go about fixing this, though... 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. 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->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. Does IE submit in this case? (In reply to comment #6) > Does IE submit in this case? Nope. only Firefox has does complete form submission. MSIE & Opera does not. I think we might need to clear out again about this. (In reply to comment #7) > (In reply to comment #6) > > Does IE submit in this case? > > Nope. only Firefox has does complete form submission. > MSIE & 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't expect the form to submit when the only submit button is disabled. This may as well as considered as a Gecko bug. (In reply to comment #8) > (In reply to comment #7) > > (In reply to comment #6) > > > Does IE submit in this case? > > > > Nope. only Firefox has does complete form submission. > > MSIE & 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'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. By the way, could you add yourself to committers.py so that Bugzilla's auto-completion can recognize you. Also, listing your IRC nick name will allow me to talk to you on #webkit more easily :) ap suggests I add you myself. What's your IRC nickname? (In reply to comment #11) > ap suggests I add you myself. What's your IRC nickname? Sure, my IRC nickname is silverroots (In reply to comment #12) > (In reply to comment #11) > > ap suggests I add you myself. What's your IRC nickname? > > Sure, my IRC nickname is silverroots Thanks Ryosuke :) (In reply to comment #8) > > Yes, we definitely need to figure out the right behavior on whatwg. Intuitively, I wouldn'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'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. 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. 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. (In reply to comment #16) > 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. 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. |