mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
Customizer: Use the sandbox
attribute to prevent top navigation from the preview.
Props valchovski. Fixes #42341. git-svn-id: https://develop.svn.wordpress.org/trunk@44583 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
065e7817c4
commit
c80325658f
1
src/js/_enqueues/wp/customize/controls.js
vendored
1
src/js/_enqueues/wp/customize/controls.js
vendored
@ -6289,6 +6289,7 @@
|
|||||||
name: 'customize-' + previewFrame.channel()
|
name: 'customize-' + previewFrame.channel()
|
||||||
} );
|
} );
|
||||||
previewFrame.iframe.attr( 'onmousewheel', '' ); // Workaround for Safari bug. See WP Trac #38149.
|
previewFrame.iframe.attr( 'onmousewheel', '' ); // Workaround for Safari bug. See WP Trac #38149.
|
||||||
|
previewFrame.iframe.attr( 'sandbox', 'allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts' );
|
||||||
|
|
||||||
if ( ! hasPendingChangesetUpdate ) {
|
if ( ! hasPendingChangesetUpdate ) {
|
||||||
previewFrame.iframe.attr( 'src', urlParser.href );
|
previewFrame.iframe.attr( 'src', urlParser.href );
|
||||||
|
@ -379,11 +379,6 @@
|
|||||||
queryParams.customize_messenger_channel = api.settings.channel;
|
queryParams.customize_messenger_channel = api.settings.channel;
|
||||||
}
|
}
|
||||||
element.search = $.param( queryParams );
|
element.search = $.param( queryParams );
|
||||||
|
|
||||||
// Prevent links from breaking out of preview iframe.
|
|
||||||
if ( api.settings.channel ) {
|
|
||||||
element.target = '_self';
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user