Closed
Bug 1661643
Opened 5 years ago
Closed 5 years ago
Remove browser.link.open_newwindow=1
Categories
(Core :: DOM: Core & HTML, task, P5)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
82 Branch
| Tracking | Status | |
|---|---|---|
| firefox82 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
// handle links targeting new windows
// 1=current window/tab, 2=new window, 3=new tab in most recent window
pref("browser.link.open_newwindow", 3);
The document for the browser.link.open_newwindow pref mentions about value 1, that opens a link to new window into current tab,
but in some case the value is just ignored:
loadAddEngines: function BrowserSearch_loadAddEngines() {
var newWindowPref = Services.prefs.getIntPref(
"browser.link.open_newwindow"
);
var where = newWindowPref == 3 ? "tab" : "window";
openTrustedLinkIn(this.searchEnginesURL, where);
},
var newWindowPref = Services.prefs.getIntPref(
"browser.link.open_newwindow"
);
var where = newWindowPref == 3 ? "tab" : "window";
and also the preference page overwrites 1 with 3:
/**
* Determines where a link which opens a new window will open.
*
* @returns |true| if such links should be opened in new tabs
*/
readLinkTarget() {
var openNewWindow = Preferences.get("browser.link.open_newwindow");
return openNewWindow.value != 2;
},
/**
* Determines where a link which opens a new window will open.
*
* @returns 2 if such links should be opened in new windows,
* 3 if such links should be opened in new tabs
*/
writeLinkTarget() {
var linkTargeting = document.getElementById("linkTargeting");
return linkTargeting.checked ? 3 : 2;
},
This means value 1 is basically unsupported and cannot be kept even if manually configured in about:config.
We should remove the underlying impl that supports value 1.
https://searchfox.org/mozilla-central/rev/ce21a13035623c1d349980057d09000e70669802/toolkit/components/windowwatcher/nsWindowWatcher.cpp#2450-2472
| Assignee | ||
Comment 1•5 years ago
|
||
| Assignee | ||
Comment 2•5 years ago
|
||
Updated•5 years ago
|
Attachment #9172640 -
Attachment description: Bug 1661643 - Remove browser.link.open_newwindow=1. r?smaug! → Bug 1661643 - Remove browser.link.open_newwindow=1. r?Gijs!
Pushed by arai_a@mac.com:
https://hg.mozilla.org/integration/autoland/rev/12d62b074178
Remove browser.link.open_newwindow=1. r=preferences-reviewers,Gijs
Comment 4•5 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox82:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•