[wp-trac] [WordPress Trac] #39097: Links in embeds can't be opened in a new tab

WordPress Trac noreply at wordpress.org
Wed Feb 7 22:22:22 UTC 2018


#39097: Links in embeds can't be opened in a new tab
---------------------------------------+------------------------------
 Reporter:  smerriman                  |       Owner:
     Type:  defect (bug)               |      Status:  reopened
 Priority:  normal                     |   Milestone:  Awaiting Review
Component:  Embeds                     |     Version:  4.4
 Severity:  normal                     |  Resolution:
 Keywords:  needs-patch needs-testing  |     Focuses:
---------------------------------------+------------------------------

Comment (by swissspidy):

 @Mte90 I'm not sure I fully understand your proposal. The problem with
 this ticket right now is that embeds need to change their `postMessage()`
 calls in a way that they're not backward compatible with the current way.
 Instead of just sending the URL being clicked, they also need to send
 whether the tab should open in a new window or not. However, opening links
 in a new window via JavaScript is usually blocked by browsers. That's why
 this tickets sounds more like a wontfix to me.

 If you want to completely allow shift-clicks for links on your site, you'd
 probably have to remove the sandbox attributes from the iframe HTML and
 adjust the JS to not use `postMessage()` for the links.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39097#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list