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:
parent
7380c0be3e
commit
c1abf942f3
|
@ -34,6 +34,7 @@
|
||||||
this.body = $( document.body );
|
this.body = $( document.body );
|
||||||
this.body.on( 'click.preview', 'a', function( event ) {
|
this.body.on( 'click.preview', 'a', function( event ) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
self.send( 'scroll', 0 );
|
||||||
self.send( 'url', $(this).prop('href') );
|
self.send( 'url', $(this).prop('href') );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue