Customize: Prevent edit shortcut from losing event handler after selective refresh.

Props sirbrillig.
Merges [39581] to the 4.7 branch.
See #27403.
Fixes #39100.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@39606 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2016-12-16 05:37:41 +00:00
parent 4ce30a06ff
commit 746b590ee7
1 changed files with 1 additions and 1 deletions

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