From c1abf942f388c5acf532eca6e982515e36a49aa6 Mon Sep 17 00:00:00 2001 From: koopersmith Date: Mon, 21 May 2012 17:58:17 +0000 Subject: [PATCH] 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 --- wp-includes/js/customize-preview.dev.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/js/customize-preview.dev.js b/wp-includes/js/customize-preview.dev.js index ca2edfaf5c..e6f8452daa 100644 --- a/wp-includes/js/customize-preview.dev.js +++ b/wp-includes/js/customize-preview.dev.js @@ -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 ); \ No newline at end of file +})( wp, jQuery );