From 68be50442193a443bc55bb146f7787d6c92d6c35 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Tue, 20 Nov 2012 20:45:03 +0000 Subject: [PATCH] Toolbar: sync jQuery and non-jQuery JS behaviour when there's a hash in the url, props tlovett1, fixes #22520 git-svn-id: https://develop.svn.wordpress.org/trunk@22728 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/js/admin-bar.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wp-includes/js/admin-bar.js b/wp-includes/js/admin-bar.js index e3830c4bf4..cb4e118491 100644 --- a/wp-includes/js/admin-bar.js +++ b/wp-includes/js/admin-bar.js @@ -69,6 +69,9 @@ if ( typeof(jQuery) != 'undefined' ) { interval: 100 }); + if ( window.location.hash ) + window.scrollBy( 0, -32 ); + $('#wp-admin-bar-get-shortlink').click(function(e){ e.preventDefault(); $(this).addClass('selected').children('.shortlink-input').blur(function(){