Middle click on Instagram videos will open a new tab with "javascript:;"
Categories
(Firefox :: Tabbed Browser, defect)
Tracking
()
People
(Reporter: tbabos, Unassigned)
Details
Attachments
(2 files)
[Affected versions]
67.0a1
66.0b5
65
[Affected platforms]
Windows 7/8/10 x64 x32
Mac OS 10.14
[Steps to reproduce]
- Go to https://www.instagram.com/p/BrnkuBXBxJM/
- Middle click on the video
[Expected result]
Nothing should happen as the videos on Instagram can't be opened in a new tab. - Chrome has this behavior
[Actual result]
A new tab is opened with "javascript:;"
[Regression - Range]:
Doesn't seem to be a regression or a recent one as it can be reproduced back to FX 47.
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 1•5 years ago
|
||
This doesn't seem like a site issue, but rather something that should be fixed in Firefox (or closed if this is expected behavior).
Instagram is wrapping the video in an anchor tag that points to "javascript:;", and we're opening a new tab for the user when they middle click.
<a class="QvAa1 " href="javascript:;" role="button" target=""><span class="jNBsH">Control</span></a>
For the following data URI:
data:text/html, <a href="javascript:console.log('hi');">middle click on me (js URL)</a> <br> <a href="">middle click on me (empty href)</a> <br> <a href="https://example.com">middle click on me</a>
Middle clicking on the first opens a new tab to the javascript URL (but does nothing in CHrome).
The second, with an empty href, does nothing (but in Chrome, opens "about:blank#blocked".
The third works as expected in both browsers.
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
I'm not sure where the best place is for this bug, but Firefox General seems like a good place to start.
Comment 4•5 years ago
|
||
I believe this belongs under Document Navigation.
Comment 5•5 years ago
|
||
Reproducible also on https://world.taobao.com/ with latest Nightly 69.0a1 (2019-07-03).
Steps:
Go to:
https://detail.tmall.com/item.htm?spm=a21wu.241046-global.4691948847.9.41cab6cbtv5fkL&acm=lb-zebra-241046-2103885.1003.4.1836644&id=40111047312&scm=1003.4.lb-zebra-241046-2103885.ITEM_40111047312_1836644 and middle click on the photo.
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
ctrl+click and middle click handling is controlled by Firefox UI code.
I believe around
https://searchfox.org/mozilla-central/rev/11712bd3ce7454923e5931fa92eaf9c01ef35a0a/browser/base/content/browser.js#6295,6299
https://searchfox.org/mozilla-central/rev/11712bd3ce7454923e5931fa92eaf9c01ef35a0a/browser/base/content/utilityOverlay.js#177
Updated•5 years ago
|
Updated•5 years ago
|
Description
•