Closed Bug 678238 Opened 13 years ago Closed 11 years ago

close one panel when another panel opens

Categories

(Add-on SDK Graveyard :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mixedpuppy, Assigned: jsantell)

References

Details

Attachments

(2 files)

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]
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: 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
Attached file GH Pull Request 840
Attachment #721961 - Flags: review?(rFobic)
Attachment #721961 - Attachment mime type: text/plain → text/html
Attachment #721961 - Flags: review?(rFobic) → review-
Attached file 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+
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
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
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.

Attachment

General

Created:
Updated:
Size: