Page MenuHomePhabricator

stall causes problems in IE when its callback returns something that's not a Deferred object
Closed, ResolvedPublic

Description

See [[en:Wikipedia:Village pump (technical)#Can't go directly to feedback pages]].

The 'stall' method installs an event handler that calls a callback which is expected to return a Deferred object, queues up a "re-fire the event" function for when that Deferred object resolves, and then returns false for the original event.

But if the callback returns something other than a Deferred object (e.g. as AFTv5 does if $.aftTrack.clickTrackingOn is false), returns an already-resolved Deferred object, or throws an exception, stall will try to re-fire the event before the original event handler returns. This causes problems in IE at least for the 'click' event, as the re-fired click is ignored.

Also, it seems if the Deferred object returned by the callback is rejected, stall will never re-fire the event since it only attaches a "done" handler and not a "fail" handler. I don't know whether or not this is intended behavior.


Version: master
Severity: normal

Details

Reference
bz42479

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:01 AM
bzimport set Reference to bz42479.
bzimport added a subscriber: Unknown Object (MLST).

https://gerrit.wikimedia.org/r/#/c/35913/ should fix the issue of not being able to re-fire the event (at least for me it does); jquery's trigger seems more reliable