runtime.openOptionsPage does not open in new tab when extension manifest specifies a newtab override
Categories
(WebExtensions :: General, defect, P3)
Tracking
(Not tracked)
People
(Reporter: dev, Unassigned)
Details
Attachments
(1 obsolete file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36 OPR/60.0.3255.170
Steps to reproduce:
When calling browser.runtime.openOptionsPage(), the settings page sometimes opens in a new tab, but sometimes opens in the current tab. The extension has overrides for the "homepage" and "newtab".
Possibly the distinction is that when it is called from "homepage", it works as expected, but when called from "newtab" it opens in the same tab.
These are the relevant manifest settings:
"chrome_url_overrides": {
"newtab": "myextensionpage.html"
},
"chrome_settings_overrides": {
"homepage": "myextensionpage.html"
},
"options_ui": {
"page": "settings.html",
"open_in_tab": true,
"browser_style": true
}
Windows 10x64
Actual results:
runtime.openOptionsPage() sometimes opens the settings page in a new tab, and sometimes opens it in the current tab.
Note if the settings page is already open in another tab, it is correctly activated.
Expected results:
The extension settings tab should open in a new tab.
to clarify the previous report after additional testing:
the issue is that when using an extension that overrides the new tab page via manifest, runtime.openOptionsPage() no longer opens the settings page in a new tab as expected, but in the current tab.
shouldnt the settings page be an exception to the newtab override? or if this behavior is intentional it should be documented how to open the settings tab from an extension that overrides the new tab page.
to reproduce:
load an extension with the following manifest:
"chrome_url_overrides": {
"newtab": "myPage.html"
},
"options_ui": {
"page": "mySettings.html",
"open_in_tab": true,
"browser_style": true
}
from myPage.html, call browser.runtime.openOptionsPage(). the options page opens in the current tab instead of a new tab
Comment 3•6 years ago
|
||
Hi Dev,
Thanks for issuing the bug. Could you please help me out a bit more so that we may advance this bug to the next step? I've created a manifest JSON with the following content:
{
"manifest_version": 2,
"name": "manifes",
"version": "1.0",
"description": "Testing overriding of newtab",
"icons": {
"48": "icons/border-48.png"
},
"chrome_url_overrides": {
"newtab": "myextensionpage.html"
},
"chrome_settings_overrides": {
"homepage": "myextensionpage.html"
},
"options_ui": {
"page": "settings.html",
"open_in_tab": true,
"browser_style": true
}
}
I went to the URL "about:debugging" on Firefox, I clicked on "Load temporary add:on" and loaded the json without trouble. However, when I opened a new tab I got Problem loading Page and a banner saying:
"Access to the file was denied
The file at moz-extension://ef11e7bc-4f0a-46a9-9c0d-27cfcabd4544/myextensionpage.html is not readable.
It may have been removed, moved, or file permissions may be preventing access."
I imagine I'm missing a step. Could you help me (taking into consideration that I've never done this before). Maybe I'm missing another file? If so please attach it. Also, screenshots are always welcomed.
Thanks in advance, Flor.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•2 years ago
|
Comment 4•1 years ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE
.
For more information, please visit BugBot documentation.
Updated•11 months ago
|
Description
•