Open Bug 1112470 Opened 10 years ago Updated 2 years ago

onclick event is not working

Categories

(Core :: DOM: Events, defect, P5)

x86_64
Windows 7
defect

Tracking

()

People

(Reporter: adinarayana.i, Unassigned)

References

Details

(5 keywords)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 Steps to reproduce: I have the following scenario in my project: In the form the following field is there: Name : <input type="text" onchange="callSyncAjax(this)" /><input type="button" onclick="doSave()" value="Save"/> In the java script : function callSyncAjax(obj) { //some syncronized ajax function here return true; } function doSave() { //form submit functionaly here } Actual results: Now i enter some name in name field and with out clicking any where or without tabbing i clicked on save button but in Fire Fox the doSave() function is not called. But i clicked again then its called. Expected results: The doSave() function should be called on first click.
Could you attach a minimal testcase?
Flags: needinfo?(adinarayana.i)
Attached file please check the new_file.html. (deleted) —
Flags: needinfo?(adinarayana.i)
Attachment #8537787 - Attachment description: please check hte new_file.html. → please check the new_file.html.
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Events
Ever confirmed: true
Product: Firefox → Core
Version: 34 Branch → Trunk
Though I think this is by design (see Bug 333198 ).
Whiteboard: [parity-Chrome][parity-IE]
Regression window: Pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=01fa971e62ee&tochange=0886ad6e6aaa Last Good: 4722b491cd0d First Bad: 687b70fea4d0 Triggered by Bug 130078
Blocks: 130078
Flags: needinfo?(roc)
Keywords: regression
Alice, what are your exact steps to reproduce here? For the testcase in comment #2, I can't reproduce the bug, although that may be because the XHR completes so fast it's done by the time I click on the button.
Flags: needinfo?(roc)
Attached file jquery-1.js (deleted) —
Attached file bug1112470.html (deleted) —
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #5) > Alice, what are your exact steps to reproduce here? > > For the testcase in comment #2, I can't reproduce the bug, although that may > be because the XHR completes so fast it's done by the time I click on the > button. Step 1. Open attachment 8539888 [details] 2. Type something in input field (do NOT press ENTER) 3. Click [Save] button Actual Results: Nothing happens. Expected Results: An alert box should popup. If you click slowly (i.e mouse down and hold few second, and then mouse up), an alert pops up as results.
Flags: needinfo?(roc)
This works for me on Linux. Could this be Windows only?
Flags: needinfo?(roc)
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #9) > This works for me on Linux. Could this be Windows only? Yes, it works on Ubuntu, but not on Window7.
Keywords: pp
Broken on OS X, too, fwiw.
Keywords: testcase
Debugging this issue, it seems that chrome is 'collecting' the input events. When the XHRs are completed, these events are sent. This is the behavior I see just debugging this issue, I didn't actually read the code. roc, what do you think if we implement something similar to what chrome does? Do we have something written in the spec about what the UA should do in this case?
Flags: needinfo?(roc)
I don't know this code that well.
Flags: needinfo?(roc) → needinfo?(bugs)
Yes, we suppress events during sync XHR and then possibly dispatch some events when the sync XHR is done.
Flags: needinfo?(bugs)
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Whiteboard: [parity-Chrome][parity-IE]
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: