Toolbar: Restore scroll-to-top functionality.
H/t Ipstenu. Introduced in [33056]. See #29906. git-svn-id: https://develop.svn.wordpress.org/trunk@33334 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b480968d9b
commit
8ea9ecdeb1
@ -129,17 +129,14 @@ if ( typeof(jQuery) != 'undefined' ) {
|
|||||||
target.siblings('.ab-sub-wrapper').find('.ab-item').each(refresh);
|
target.siblings('.ab-sub-wrapper').find('.ab-item').each(refresh);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#wpadminbar').click( function(e) {
|
adminbar.click( function(e) {
|
||||||
if ( e.target.id != 'wpadminbar' && e.target.id != 'wp-admin-bar-top-secondary' ) {
|
if ( e.target.id != 'wpadminbar' && e.target.id != 'wp-admin-bar-top-secondary' ) {
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
adminbar.find( 'li.menupop.hover' ).removeClass( 'hover' );
|
|
||||||
e.stopPropagation();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
e.preventDefault();
|
adminbar.find( 'li.menupop.hover' ).removeClass( 'hover' );
|
||||||
$( 'html, body' ).animate( { scrollTop: 0 }, 'fast' );
|
$( 'html, body' ).animate( { scrollTop: 0 }, 'fast' );
|
||||||
|
e.preventDefault();
|
||||||
});
|
});
|
||||||
|
|
||||||
// fix focus bug in WebKit
|
// fix focus bug in WebKit
|
||||||
|
Loading…
Reference in New Issue
Block a user