Closed Bug 235062 Opened 22 years ago Closed 22 years ago

onClick event not being handled before form submit

Categories

(Core :: DOM: Events, defect)

x86
Windows NT
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: mattcoz, Unassigned)

Details

Attachments

(1 file)

User-Agent: Build Identifier: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 When I have a submit button with an onClick event handler, the form is submitted before the event is handled. In all previous versions of the browser, as well as in IE, the event is handled first and then the form is submitted. I can see this possibly causing major problems on many previously working sites. Reproducible: Always Steps to Reproduce: 1. Click on submit button with onClick event handler Actual Results: Form is submitted and the event is handled afterwards. Expected Results: The event should be handled first before the form is submitted.
Attached file Testcase
That testcase worksforme with a current trunk linux build -- the click event is fired before the submit (as you can tell by the resulting URI). Does that testcase show the problem for you, Matt? If not, could you attach one that does?
I tried the test case and got "The attachment id is invalid." and the uri showed "test=" the first time and "test=clicked" the second time. This is the same behavior I experienced on my site. I have a trunk build installed on my home computer, I'll try it when I get home and see if I get the same result.
Works in my trunk build. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040211 Firebird/0.8.0+ (stipe)
Ok. Sounds like a 1.6 problem then... (or a firefox 0.8 problem)
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → WORKSFORME
Just realized this happens for regular links as well as forms. Sucks that a bug like this made it into the release.
Went back to problem as described in Summary. Found that C:\Documents and Settings\USERNAME\Application Data\Phoenix\Profiles\default\guhh97z5.slt\signons.txt was the problem. I deleted the file and restarted FireFox 0.8. Everything is fine.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: