Ticket #8892 (closed bug: fixed)
Callback is raised before objects are shown with fadeIn() and jQuery.fx.off = true
|Reported by:||dan@…||Owned by:||timmywil|
With animations disabled, $('#object').fadeIn(500, callback) calls the user sent callback function before actually showing the object in the DOM.
Example: See jsFiddle at http://jsfiddle.net/kf4vu/22/
With animations enabled, the callback is raised correctly (ex: same code but with animations on , http://jsfiddle.net/yhECL/).
Furthermore, the callback works as expected using .show, ( $('#obj').show(callback) ) with animations either on or off, so this seems to be strictly a fadeIn/fadeOut/similar animations issue.
This causes many issues, especially when trying to .focus() an input field; if the callback is called before the parent element is shown, it doesn't focus (ex: http://jsfiddle.net/bDgav/1/), and jQuery docs even say that IE will throw an error (calling .focus() on hidden element).
This is only an issue with animations off ( jQuery.fx.off = false ), and works as expected with animations on.
- Priority changed from undecided to high
- Status changed from new to open
- Component changed from unfiled to effects
- Owner set to timmywil
- Status changed from open to assigned
comment:11 Changed 13 months ago by gnarf
- Status changed from assigned to closed
- Resolution set to fixed