-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix MV3 on Firefox for Android #7464
Fix MV3 on Firefox for Android #7464
Conversation
To test on Android:
To inspect the extension:
|
This also works on regular Firefox, you just have to change the package name in the web-ext command to Anyhoo, can confirm the extension now works (Firefox for Android Stable 126.0; Android 14 QPR2 on Google Pixel 7a). I can't test everything but the extension loads correctly and the addons I try seem to work correctly (at least as well as they can on mobile). The initial permissions page didn't display correctly in either orientation but was usable exclusively in portrait mode. I don't know if that's a new development, however. Either way, we should get this out as soon as possible as long as it's confirmed this won't break anything on desktop browsers. |
Thanks for figuring out how to test on mobile Firefox, I wasn't that lucky as I got some weird error when trying to run the web-ext command. |
@@ -2,6 +2,7 @@ | |||
<html lang="en"> | |||
<head> | |||
<meta charset="UTF-8" /> | |||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this cause some issues on desktop? 🤔 The size of the popup has frequently created problems.
Maybe to be on the safe side we should add this dynamically with JavaScript if the user agent matches mobile Chromium or mobile Firefox?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't noticed any problems so far and Vue 3 also adds it but it's better to be safe I guess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless it's handled differently in extension popups for some reason, the viewport tag has no effect on desktop.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then let's assume this didn't break anything unless we've got proof otherwise
Resolves #6976
Resolves #7461
Changes
Sets the viewport on the popup and checks if
chrome.contextMenus
is defined before using it since it errors on Firefox for Android now.Also removes some weird icon handling I added back in #4810. Now it always uses the icons set in the extension's manifest.
Reason for changes
The popup wasn't scaling correctly and after MV3 the extension completely broke. It's also nice to be able distinguish Git versions even if they're stable.
Tests
Tested on Andorid Firefox Beta, desktop Firefox and Chromium. The viewport doesn't seem to change the popup on Desktop and Firefox works on Android again including Scratch notifier.