Open
Bug 1250652
Opened 9 years ago
Updated 2 years ago
Don't open new tab after stopping of middle button mouseup event (calling preventDefault on it) on hyperlinks
Categories
(Firefox :: Tabbed Browser, defect)
Tracking
()
NEW
People
(Reporter: scarylittlerabbit, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160223030304
Steps to reproduce:
hyperlink.addEventListener('mouseup', function(e) {e.preventDefault();});
https://bugzilla.mozilla.org/show_bug.cgi?id=1249970#c17
Actual results:
new tab opened
Expected results:
nothing
Comment 1•9 years ago
|
||
So to actually make it clear what this bug report is about, since comment 0 doesn't and you have to wade through three other bug reports to get the full picture...
The desire here on the part of the web page is to prevent middle click on a link from opening a new tab. The problems are:
1) For middle clicks, the click event is not sent to the web page, so the page can't preventDefault on it and prevent the tab opening that way. See bug 1249922.
2) preventDefault on the mouseup event doesn't prevent the click event from firing. See bug 1249970.
So if the Firefox UI uses middle-button click events (which it DOES get, unlike web pages) to trigger the new tab behavior, there is no way for the web page to prevent it. This bug report is a request for that UI to do something that allows a web page to prevent the default behavior here.
Status: UNCONFIRMED → NEW
Component: Untriaged → Tabbed Browser
Ever confirmed: true
Summary: don't open new tab after stopping of middle button mouseup event on hyperlinks → Don't open new tab after stopping of middle button mouseup event (calling preventDefault on it) on hyperlinks
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•