From 4370cd70635aae7ab8099ec75357090927b40029 Mon Sep 17 00:00:00 2001 From: Daryl 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: https://develop.svn.wordpress.org/trunk@20833 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 );