WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#35239 closed enhancement (wontfix)

Open Post Embed in New Window

Reported by: awarner20 Owned by: swissspidy
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Embeds Keywords: needs-patch
Focuses: Cc:

Description

Wondering if "open in new window/tab" can be considered for Post Embed feature of 4.4

I love being able to reference posts on other sites this way, but having the post embeds open in the same window is deterring me from using them extensively.

Change History (6)

#1 @afercia
6 years ago

  • Keywords close added

Hello @awarner20. Usage of target="_blank" in general is being reviewed in #23432. Personally, I wouldn't recommend to force any link to open a new tab/window. It has been a few years since browsers introduced the ability for users to choose if they want to open a link in a new tab or window and as developers we should simply stop taking control of users browser :)
I'd be inclined to close this ticket but will defer to @swissspidy since WP oEmbed is his little creature.

#2 follow-up: @swissspidy
6 years ago

It has been a few years since browsers introduced the ability for users to choose if they want to open a link in a new tab or window and as developers we should simply stop taking control of users browser :)

I agree with that, though I think we currently ignore the ctrl/cmd key when clicking on the link, which we probably should fix.

When you Cmd+click on a link it opens a new window, but since we check links in JavaScript we should probably account for that.

#3 in reply to: ↑ 2 @afercia
6 years ago

  • Keywords needs-patch added; close removed
  • Owner set to swissspidy
  • Status changed from new to assigned

Replying to swissspidy:

I agree with that, though I think we currently ignore the ctrl/cmd key

I see now the linkClickHandler() / postMessage thing :) A bit tricky but ideally it should take into account Cmd/Ctrl and Shift keys.

#4 @swissspidy
6 years ago

Because we're passing the clicked URL using postMessage and doing the event handling ourselves, we'd need to use window.open() here. This is usually blocked by browsers, resulting in a bad user experience because nothing happens when clicking on a link inside our iframe.

So we can't really implement this right now.

#5 @swissspidy
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed

Closing this as per my previous comment.

#6 @swissspidy
5 years ago

#39097 was marked as a duplicate.

Note: See TracTickets for help on using tickets.