From ae9854e33815887d40878de5c32f248d0f54e826 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 12 Dec 2016 07:52:00 +0000 Subject: [PATCH] Customize: Prevent edit shortcut from losing event handler after selective refresh. Props sirbrillig. See #27403. Fixes #39100. git-svn-id: https://develop.svn.wordpress.org/trunk@39581 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/customize-selective-refresh.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/js/customize-selective-refresh.js b/src/wp-includes/js/customize-selective-refresh.js index f6dfa0b9d8..0735b237c8 100644 --- a/src/wp-includes/js/customize-selective-refresh.js +++ b/src/wp-includes/js/customize-selective-refresh.js @@ -121,12 +121,12 @@ wp.customize.selectiveRefresh = ( function( $, api ) { return; } $shortcut = partial.createEditShortcut(); - partial.addEditShortcutToPlacement( placement, $shortcut ); $shortcut.on( 'click', function( event ) { event.preventDefault(); event.stopPropagation(); partial.showControl(); } ); + partial.addEditShortcutToPlacement( placement, $shortcut ); }, /**