[wp-trac] [WordPress Trac] #47363: Not possible to open link to plugin in new tab
WordPress Trac
noreply at wordpress.org
Thu May 23 11:30:26 UTC 2019
#47363: Not possible to open link to plugin in new tab
---------------------------------------+-----------------------------
Reporter: timhavinga | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Embeds | Version: 5.2.1
Severity: normal | Keywords:
Focuses: accessibility, javascript |
---------------------------------------+-----------------------------
Current behavior:
When I use a right click or scroll wheel click to open the link to a
plugin in a new tab or window, the current window is immediately
redirected to the plugin page on wordpress.org.
Expected behavior:
Either the context menu opens (on right click) or the link opens in a new
tab (on mouse wheel click).
The links in the wp-embed for a plugin are just plain links. However, the
clicks on the links are catched in JavaScipt and passed to the parent, to
be able to open the link in the current browser window instead of the
embed iframe.
Downside is, this behavior is also triggered when I use a right-click or
middle-click.
A simple check using MouseEvent.button [1] should do the trick.
I don't know if this is a WordPress core bug, because the JS code in
question seems to be provided by https://wordpress.org
[1] https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47363>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list