Open Bug 1512545 Opened 5 years ago Updated 2 years ago

BrowserSetting.clear() does not work as documented

Categories

(WebExtensions :: General, defect, P3)

63 Branch
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: pedro, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0

Steps to reproduce:

Create an extension that toggles the proxy settings in a convenient UI element (ProxySwitcheroo). The initial version implemented an independent proxy with a PAC. Because that doesn't support all possible options I've changed it to use the BrowserSetting API and just have the user use whatever proxy options he wants.


Actual results:

The extension worked fine but users are confused that when the extension is ON the proxy settings can't be changed. Only when the extension is set to the OFF state can the browser settings be changed.


Expected results:

I should be able to do something like:

browser.proxy.settings.set({value: proxySettings, block: false});

Where I'm changing the setting just the same but allow the user to still change it, instead of blocking that UI in the preferences.
Hi Pedro Côrte-Real,

I've downloaded ProxySwitcheroo and encountered the same behavior you mentioned on Firefox Release and latest Nightly 65.0a1.
However, I'm not entirely sure if this is working as intended (see that there is a notification suggesting that the add-on is controlling connection to the internet) or if this is an issue. The fact that it is blocking a part of the UI is indeed confusing.

I will set a component for now and so the development team can address this issue.

Thanks for the report!
Component: Untriaged → Preferences
Component: Preferences → Untriaged
Product: Firefox → WebExtensions
On a related note the clear() API is also broken. To reproduce:

- Set the proxy settings to "Use system proxy settings"
- browser.proxy.settings.set({value: (... some settings with manual proxy...)});
- browser.proxy.settings.clear({});

At this point the proxy settings are "No Proxy" instead of "Use system proxy settings". So clear() is broken, instead of undoing the change the extension did it resets the setting. That's against the docs:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/types/BrowserSetting/clear

"Use BrowserSetting.clear() to clear any changes the extension has made to the browser setting. The browser setting will revert to its previous value."

Let me know if you'd like a separate bug report for this.
Priority: -- → P3
According to this:

https://wiki.mozilla.org/Bugzilla:Priority_System

P3 is a nice-to-have wishlist, which seems appropriate for the original bug report. Should I then submit a separate bug report with the issue with BrowserSetting.clear() which seems clearly broken and not just a wishlist item?
That's about the priority system for Bugzilla itself. At the top of that page, you can see a link to find triage process for things in Mozilla-central and Bugzilla. You will end up here: https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md

But our plan is to repurpose this bug to be for what you state in #c2.
But how about the original point then? Is that wontfix?
Summary: BrowserSetting.set() should allow having the extension not block further changes to the setting → BrowserSetting.clear() does not work as documented
Component: Untriaged → General
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.