onOpenOptionsPage doesn't actually trigger a page load
Categories
(Fenix :: WebExtensions, defect, P3)
Tracking
(Not tracked)
People
(Reporter: csadilek, Assigned: m_kato)
Details
Attachments
(2 files)
From github: https://github.com/mozilla-mobile/android-components/issues/11182.
STR:
- Install 10ten Japanese Reader using the following collection details:
Collection owner (user ID): 6693726
Collection name: japanese- Enable the extension
- Load a page with Japanese text, e.g. https://ja.wikipedia.org/
- Drag the "puck" so that some Japanese text is highlighted and popup window shows
- Press the settings icon in the top-right of the popup
Expected results:
The options page is loaded in a new tab.
Actual results:
A new tab is opened with the options URL filled in the location, but it is not loaded.
If you open the location bar and press "Enter" / "Go" etc., however the page loads successfully.
Furthermore, if you open the options page from the menu it loads successfully.
(Note that the options page is currently not scrollable but that is a bug in the add-on itself and has been fixed upstream.)
Video:
https://user-images.githubusercontent.com/1232595/139200056-e490142d-9c82-47cd-9d20-94f12246ae08.mp4
Notes:
This add-on does not set
open_in_tab
so the options page should be loaded using theonOpenOptionsPage
handler added in eed463d931206f3eb49edc864aa09c5888b4cf09 (see #7397).At a guess, I wonder if instead of passing
false
as theactive
flag toonNewTab
we should be passingtrue
, here:Note that the operation of this add-on is:
- Content script passes an
'options'
message to the background page- Then the background page calls
browser.runtime.openOptionsPage()
.┆Issue is synchronized with this Jira Task
Change performed by the Move to Bugzilla add-on.
Comment 1•2 years ago
|
||
The severity field is not set for this bug.
:cpeterson, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Updated•1 year ago
|
Comment 2•9 months ago
|
||
I created a minimal extension to reproduce the problem.
- Unzip openOptionsPage.zip
- Load it in Firefox Android
- Open popup
- Click Open options button
- The options page opens in a new tab, but the page remains blank. If you reload the page, it will be displayed (with the title Options).
Updated•8 months ago
|
Comment 3•6 months ago
|
||
(Regarding the original report, I've temporarily disabled the settings bug in the 10ten Japanese Reader extension on Android until this is fixed. Please refer to the STR in comment 2 instead when testing.)
Assignee | ||
Comment 4•5 months ago
•
|
||
I guess that tabHandler.onNewTab
just open new Tab, but it doesn't call GeckoSesison.loadUri
. So onOpenOptionsPage should call EnglineSession.loadUrl
after calling onNewTab
.
Assignee | ||
Updated•5 months ago
|
Comment 5•5 months ago
|
||
Comment 6•4 months ago
|
||
The current implementation of onOpenOptionsPage
in A-C is incorrect, and even the proposed one at https://github.com/mozilla-mobile/firefox-android/pull/4789 does not behave as expected.
The expected behavior is to open the embedded options page (if open_in_tab
is false, which is the default). To see the desired effect, visit the Add-ons Manager, and click on the Settings page of an add-on that has options_ui.page
set without options_ui.open_new_tab
. An example of such an add-on that is Android-compatible is https://addons.mozilla.org/en-US/android/addon/dont-track-me-google1/
Upon clicking "Settings", the "[addon title]" banner stays at the top, and the options page is still loaded. The "back" button goes back to the individual Add-ons management view. This is implemented at https://searchfox.org/mozilla-mobile/rev/ab420b41bfcfb41d5c3c12c4b412056108bf1108/firefox-android/fenix/app/src/main/java/org/mozilla/fenix/addons/InstalledAddonDetailsFragment.kt#285-303
Description
•