close one panel when another panel opens

RESOLVED FIXED

Status

Add-on SDK
General
P2
normal
RESOLVED FIXED
7 years ago
5 years ago

People

(Reporter: mixedpuppy, Assigned: jsantell)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

7 years ago
If you have two panels open at the same time, and close both, the second panel closed causes the following exception:

Traceback (most recent call last):
  File "resource://openwebapps-at-mozillalabs-dot-com-addon-kit-lib/panel.js", line 294, in _onHide
    this._frameLoadersSwapped = false;
  File "resource://openwebapps-at-mozillalabs-dot-com-addon-kit-lib/panel.js", line 96, in null
    .swapFrameLoaders(this._viewFrame);
[Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIFrameLoaderOwner.swapFrameLoaders]"  nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)"  location: "JS frame :: resource://openwebapps-at-mozillalabs-dot-com-api-utils-lib/securable-module.js -> resource://openwebapps-at-mozillalabs-dot-com-api-utils-lib/securable-module.js -> resource://openwebapps-at-mozillalabs-dot-com-addon-kit-lib/panel.js :: <TOP_LEVEL> :: line 96"  data: no]
"]
So, out of curiosity - what is your use-case for opening two panels at the same time? I'm trying to figure out if we really even want to allow it.
Whiteboard: [triage:followup]
(Reporter)

Comment 2

7 years ago
I'm fine with not allowing it, but it is possible to do.  

A unit test for openwebapps installs a test app and opens the panel for the test app.  The installation of the test app also causes the dashboard panel to open.  Upon closing both, you get that exception.

It's not a use case, but rather a side affect or design bug in owa.  I'd be happy with panels being closed if another panel is opened.
OS: Mac OS X → All
Priority: -- → P2
Hardware: x86 → All
Summary: exception caused by two panels open at same time → close one panel when another panel opens
Whiteboard: [triage:followup]
Target Milestone: --- → 1.3
(Pushing all open bugs to the --- milestone for the new triage system)
Target Milestone: 1.3 → ---
(Assignee)

Updated

5 years ago
Assignee: nobody → jsantell
Only one panel may be open at a time, across the entire platform, but we do have an option to allow one panel per addon ID
Created attachment 721961 [details]
GH Pull Request 840
Attachment #721961 - Flags: review?(rFobic)
Attachment #721961 - Attachment mime type: text/plain → text/html
Attachment #721961 - Flags: review?(rFobic) → review-
Created attachment 727385 [details]
GH Pull Request 840
Attachment #727385 - Flags: review?(rFobic)
Comment on attachment 727385 [details]
GH Pull Request 840

Looks good thanks!

There are few nits (meaning not important things that are nice to address but it's up to you to decide), no need for another review though.
Attachment #727385 - Flags: review?(rFobic) → review+

Comment 8

5 years ago
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/53dba84127b91e3006e5c5479e90b226f3e0793d
Merge pull request #840 from jsantell/show-only-one-panel-678238

Fix Bug 678238: Only one panel should be shown at a time, a=@gozala

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Comment 9

5 years ago
Commit pushed to integration at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/53dba84127b91e3006e5c5479e90b226f3e0793d
Merge pull request #840 from jsantell/show-only-one-panel-678238
You need to log in before you can comment on or make changes to this bug.