Make WordPress Core

Changeset 44583


Ignore:
Timestamp:
01/14/2019 07:24:16 AM (6 years ago)
Author:
pento
Message:

Customizer: Use the sandbox attribute to prevent top navigation from the preview.

Props valchovski.
Fixes #42341.

Location:
trunk/src/js/_enqueues/wp/customize
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/customize/controls.js

    r43391 r44583  
    62906290            } );
    62916291            previewFrame.iframe.attr( 'onmousewheel', '' ); // Workaround for Safari bug. See WP Trac #38149.
     6292            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' );
    62926293
    62936294            if ( ! hasPendingChangesetUpdate ) {
  • trunk/src/js/_enqueues/wp/customize/preview.js

    r43347 r44583  
    380380        }
    381381        element.search = $.param( queryParams );
    382 
    383         // Prevent links from breaking out of preview iframe.
    384         if ( api.settings.channel ) {
    385             element.target = '_self';
    386         }
    387382    };
    388383
Note: See TracChangeset for help on using the changeset viewer.