Open
Bug 664720
Opened 13 years ago
Updated 2 years ago
onmouseup event not fired when onmousedown generate a synchronous XHR
Categories
(Core :: DOM: Events, defect)
Tracking
()
NEW
People
(Reporter: nfaugout, Assigned: smaug)
References
(Blocks 1 open bug, )
Details
Attachments
(1 file)
111.88 KB,
image/png
|
Details |
User-Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.91 Safari/534.30 Build Identifier: 4.0.1 When an HTML element such as a DIV has onmousedown and oumouseup events each associated with a javascript function and the onmousedown code creates a synchronous ajax request, then the onmouseup function is not called if user released the mouse button before the ajax request ends. The URL show the problem. The file that is pointed by the AJAX request waits 200ms before ending. So if you make a mouse down/up shorter than 200ms, the mouseup function is not triggered. Reproducible: Always Steps to Reproduce: 1. Make a mouse down/up on the blue DIV element shorter than 200ms Actual Results: The mouse up function is not called Expected Results: The mouse up function should be called There is no workaround that I could find
Assignee | ||
Comment 1•13 years ago
|
||
Yeah, sync XHR messes with event handling in all the browsers. It re-orders key events in non-gecko engines, and gecko has its own problems like this. Sync XHR is in general bad for UX, and I hope we could deprecate it. But, however, this bug is perhaps something I could fix.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 2•13 years ago
|
||
I'll try to look at this soonish. But please remind me if I don't manage to do anything in a week or so.
Assignee: nobody → Olli.Pettay
Assignee | ||
Comment 3•13 years ago
|
||
Hmm, this should work. Something has regressed or something...
Reporter | ||
Comment 4•13 years ago
|
||
It works fine on IE and Chrome. Thanks for looking at it. (In reply to comment #1) > Yeah, sync XHR messes with event handling in all the browsers. > It re-orders key events in non-gecko engines, and gecko has its own > problems like this. > > Sync XHR is in general bad for UX, and I hope we could deprecate it. > > But, however, this bug is perhaps something I could fix.
Reporter | ||
Comment 5•13 years ago
|
||
Hi Olli, You told me to remind you after one week, that's what I do. I see that Firefox has released version 5 and insist for people to upgrade from version 4 to 5. Do I should consider that Firefox 4 will soon be deprecated ? I will test under Firefox 5 if the BUG still exists.
Assignee | ||
Comment 6•13 years ago
|
||
(In reply to comment #5) > You told me to remind you after one week, that's what I do. Thanks! > Do I should consider that Firefox 4 will soon be deprecated ? There won't be any updates to Firefox 4. Firefox 5 is the update to Firefox 4.
Reporter | ||
Comment 7•13 years ago
|
||
I installed Firefox 5. The BUG is still here. Do I need to file a new BUG for it ?
Is an intermediate fix for this bug – and its dupes – on anybody's agenda, or is e10s going to be the designated bugfix? See screenshot. Possible dupes: https://bugzilla.mozilla.org/show_bug.cgi?id=636171#c4 (testcase) https://bugzilla.mozilla.org/show_bug.cgi?id=672677 https://bugzilla.mozilla.org/show_bug.cgi?id=685971 https://bugzilla.mozilla.org/show_bug.cgi?id=687451 https://bugzilla.mozilla.org/show_bug.cgi?id=810691 https://bugzilla.mozilla.org/show_bug.cgi?id=867938 https://bugzilla.mozilla.org/show_bug.cgi?id=934422 Several testcases
Assignee | ||
Comment 9•10 years ago
|
||
/me starts thinking how to remove support for sync XHR from main thread. But I think this bug may need to be fixed before that. The problem is that all the browser mess with the event ordering when sync XHR is involved. It just varies which events.
Assignee | ||
Comment 10•10 years ago
|
||
See http://xhr.spec.whatwg.org/#sync-warning and recent discussion on http://lists.w3.org/Archives/Public/public-webapps/
Comment 11•10 years ago
|
||
> Warning: Synchronous XMLHttpRequest on the main thread is deprecated because of
> its detrimental effects to the end user's experience. For more help
> http://xhr.spec.whatwg.org/
That plea regarding the main-thread sounds a bit like "Your website breaks our browser and we don't want to or can't fix it. Please stop breaking our browser."
Assignee | ||
Comment 12•10 years ago
|
||
No. It is about user experience. Fortunately use of sync XHR is declining. I would review a fix for this bug, but personally this isn't a high priority bug given that sync XHR is deprecated and all the browser vendors want to get rid of it. See for example http://blogs.msdn.com/b/wer/archive/2011/08/03/why-you-should-use-xmlhttprequest-asynchronously.aspx
Flags: needinfo?(bugs)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•