Closed Bug 1285493 Opened 3 years ago Closed 3 years ago

Tab closes if webextension is disabled from details page

Categories

(WebExtensions :: Untriaged, defect, P1)

48 Branch
defect

Tracking

(firefox50 verified)

VERIFIED FIXED
mozilla50
Tracking Status
firefox50 --- verified

People

(Reporter: TheOne, Assigned: kmag)

References

Details

(Whiteboard: [tabs] triaged)

Attachments

(2 files)

Attached file Archive.zip
If the attached webextension is installed, clicking "Disable" on the about:addons details page closes the tab.

STR:
1. Install the attached webextension (don't use temporary loading).
2. Go to about:addons and double click the entry.
3. Click "Disable".

Expected results:
The tab does not close.

Actual results:
The tab closes.

This worked in Fx47 and is broken in Fx48b5.
Tried this in both the FX48b5 and the latest build of Firefox nightly and can still confirm the problem. 

You can still disable the add-on if you click the disable without double clicking to show the addition information. It only seems to close the tab on viewing the further information and trying to disable it.
Assignee: nobody → kmaglione+bmo
Priority: -- → P1
Whiteboard: [tabs] triaged
Comment on attachment 8772654 [details]
Bug 1285493: Add-on Manager should not be closed when an add-on with options_ui is disabled.

https://reviewboard.mozilla.org/r/65400/#review62586

I don't think I'm qualified to review this, my understanding of the relationships between docshell/window/browser/etc is too shallow...
Attachment #8772654 - Flags: review?(aswan)
Attachment #8772654 - Flags: review?(wmccloskey)
Comment on attachment 8772654 [details]
Bug 1285493: Add-on Manager should not be closed when an add-on with options_ui is disabled.

https://reviewboard.mozilla.org/r/65400/#review63332

::: browser/components/extensions/ext-tabs.js:48
(Diff revision 1)
>  }
>  
> -// WeakMap[ExtensionContext -> {tab, parentWindow}]
> -var pageDataMap = new WeakMap();
> +function getDocShellOwner(docShell) {
> +  let browser = docShell.chromeEventHandler;
> +
> +  let browserWindow = browser.ownerGlobal;

Maybe call this xulWindow?
Attachment #8772654 - Flags: review?(wmccloskey) → review+
https://hg.mozilla.org/integration/fx-team/rev/b3a0aa75399dbb7da9a246082293cdd36fe05be7
Bug 1285493: Add-on Manager should not be closed when an add-on with options_ui is disabled. r=billm
https://hg.mozilla.org/mozilla-central/rev/b3a0aa75399d
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
I was able to reproduce the initial issue on Firefox 50.0a1 (2016-07-08) under Windows 10 64-bit.

Verified fixed on Firefox 51.0a1 (2016-08-31) and Firefox 50.0a2 (2016-09-01) under Windows 10 64-bit and Ubuntu 16.04 32-bit. The tab is no longer closed while disabling the add-on.

I’ve also noticed that the “Enable/Disable” and “Remove” buttons change their position when the add-on is enabled and disabled back: http://screencast.com/t/c7ga5q2uF6x
Should we be concerned about this behaviour?
Status: RESOLVED → VERIFIED
Flags: needinfo?(awagner)
It looks a bit odd, can you file a follow-up bug, please? Thanks!
Flags: needinfo?(awagner)
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.