[wp-trac] [WordPress Trac] #17309: Pending Count no longer updates on Approve/Unapprove
WordPress Trac
wp-trac at lists.automattic.com
Wed May 4 11:00:40 UTC 2011
#17309: Pending Count no longer updates on Approve/Unapprove
--------------------------+------------------
Reporter: DH-Shredder | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.2
Component: Comments | Version: 3.2
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------
Comment (by greuben):
jQuery 1.5 introduced a new featured 'Deferred Object'. IIRC What it does
is, it allows multiple callback functions.
jQuery ajax uses deferred object which pushes all callback functions into
an array before hand which means dynamically added functions/objects are
not taken into account. The `ajaxDim` function in wp-lists.dev.js function
dynamically creates the 'complete' callback which then calls `dimAfter`.
Since dynamically added functions/objects are not considered `dimAfter` is
never called.
{{{
s.success = function(r) {
...
if ( $.isFunction(s.dimAfter) ) {
o = this.complete;
this.complete = function(x,st) {
...
};
}}}
The bug with deferred ajax should be fixed upstream, until then we can
revert back to jQuery 1.4 or change the way `ajaxComplete` callbacks are
managed
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17309#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list