Customize: Prevent edit shortcut buttons from being inserted into container elements in the `head` or into elements which should not get interactive children.
See #27403, #38672. Fixes #38830. Built from https://develop.svn.wordpress.org/trunk@39270 git-svn-id: http://core.svn.wordpress.org/trunk@39210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e4a83d2e6f
commit
4664f80711
|
@ -109,12 +109,14 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
|
|||
* @returns {void}
|
||||
*/
|
||||
createEditShortcutForPlacement: function( placement ) {
|
||||
var partial = this, $shortcut, $placementContainer;
|
||||
var partial = this, $shortcut, $placementContainer, illegalAncestorSelector, illegalContainerSelector;
|
||||
if ( ! placement.container ) {
|
||||
return;
|
||||
}
|
||||
$placementContainer = $( placement.container );
|
||||
if ( ! $placementContainer.length ) {
|
||||
illegalAncestorSelector = 'head';
|
||||
illegalContainerSelector = 'area, audio, base, bdi, bdo, br, button, canvas, col, colgroup, command, datalist, embed, head, hr, html, iframe, img, input, keygen, label, link, map, math, menu, meta, noscript, object, optgroup, option, param, progress, rp, rt, ruby, script, select, source, style, svg, table, tbody, textarea, tfoot, thead, title, tr, track, video, wbr';
|
||||
if ( ! $placementContainer.length || $placementContainer.is( illegalContainerSelector ) || $placementContainer.closest( illegalAncestorSelector ).length ) {
|
||||
return;
|
||||
}
|
||||
$shortcut = partial.createEditShortcut();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.7-beta4-39269';
|
||||
$wp_version = '4.7-beta4-39270';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue