Customize: Prevent re-highlighting "Add Items" button after available nav menu items pane has already been opened.
Amends [41930]. Props bpayton. See #42114. git-svn-id: https://develop.svn.wordpress.org/trunk@41950 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4238b2895f
commit
8206a9d225
|
@ -786,15 +786,19 @@
|
||||||
canceled = true;
|
canceled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove animation class in case it was already applied.
|
|
||||||
button.removeClass( animationClass );
|
|
||||||
|
|
||||||
params.focusTarget.on( 'focusin', cancelReminder );
|
params.focusTarget.on( 'focusin', cancelReminder );
|
||||||
setTimeout( function() {
|
setTimeout( function() {
|
||||||
params.focusTarget.off( 'focusin', cancelReminder );
|
params.focusTarget.off( 'focusin', cancelReminder );
|
||||||
|
|
||||||
if ( ! canceled ) {
|
if ( ! canceled ) {
|
||||||
button.addClass( animationClass );
|
button.addClass( animationClass );
|
||||||
|
button.one( 'animationend', function() {
|
||||||
|
/*
|
||||||
|
* Remove animation class to avoid situations in Customizer where
|
||||||
|
* DOM nodes are moved (re-inserted) and the animation repeats.
|
||||||
|
*/
|
||||||
|
button.removeClass( animationClass );
|
||||||
|
} );
|
||||||
}
|
}
|
||||||
}, params.delay );
|
}, params.delay );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue