Theme Customizer: Reset scroll to top when the preview url is changed. props ocean90, fixes #20713, see #19910.

git-svn-id: http://core.svn.wordpress.org/trunk@20833 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
koopersmith 2012-05-21 17:58:17 +00:00
parent 7380c0be3e
commit c1abf942f3
1 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@
this.body = $( document.body );
this.body.on( 'click.preview', 'a', function( event ) {
event.preventDefault();
self.send( 'scroll', 0 );
self.send( 'url', $(this).prop('href') );
});
@ -83,4 +84,4 @@
});
});
})( wp, jQuery );
})( wp, jQuery );