WordPress.org

Make WordPress Core

Ticket #39097: 39097.3.diff

File 39097.3.diff, 579 bytes (added by garrett-eclipse, 11 months ago)

Refresh to correct doc comment spelling and introduce shiftKey and altKey to the modifier exclusion list to support 'open in new window' and 'save link as' features respectively.

  • src/js/_enqueues/lib/embed-template.js

     
    161161                                href = target.parentElement.getAttribute( 'href' );
    162162                        }
    163163
     164                        // Only clicks from the primary mouse button without any modifiers need to be caught.
     165                        if ( event.altKey || event.ctrlKey || event.metaKey || event.shiftKey ) {
     166                                return;
     167                        }
     168
    164169                        /**
    165170                         * Send link target to the parent (embedding) site.
    166171                         */