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
This commit is contained in:
Weston Ruter 2016-12-12 07:52:00 +00:00
parent 24228daabf
commit ae9854e338

View File

@ -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 );
},
/**