Closed Bug 795518 Opened 12 years ago Closed 12 years ago

content api for closing panels

Categories

(Firefox Graveyard :: SocialAPI, defect)

defect
Not set
normal

Tracking

(firefox17+ fixed)

RESOLVED FIXED
Firefox 18
Tracking Status
firefox17 + fixed

People

(Reporter: mixedpuppy, Assigned: markh)

Details

(Whiteboard: [Fx17])

Attachments

(1 file)

social panels (flyout, status and chat) need an api for closing the panel.  One was implemented for flyouts, it should be updated or verified to work with the panel that is calling the api.
This is related to but not dependent on bug 794640
On IRC, Jaws suggested we just use window.close.  I've a patch which uses the DOMWindowClose event to implement this (no tests and no support for chat windows yet) - but what d'ya reckon?
Status: NEW → ASSIGNED
cool, I would much prefer window.close.  iirc we pass back the window object on any opening api.
window.close(), when used on a chatbar window or a panel window will close the chat/panel.
Attachment #666805 - Flags: review?(mixedpuppy)
Attachment #666805 - Flags: review?(jaws)
Comment on attachment 666805 [details] [diff] [review]
Have window.close() close panels and chats

Review of attachment 666805 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/social/MozSocialAPI.jsm
@@ +174,4 @@
>      // set a timer which will fire after the unload events have all fired.
>      schedule(function () { port.close(); });
>    });
> +  targetWindow.addEventListener("DOMWindowClose", function(evt) {

Please name this function and remove the event listener.
Attachment #666805 - Flags: review?(mixedpuppy)
Attachment #666805 - Flags: review?(jaws)
Attachment #666805 - Flags: review+
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
As discussed on IRC, the listener can't be removed as it might fire multiple times.

https://hg.mozilla.org/integration/mozilla-inbound/rev/3b58a62ebfd9
https://hg.mozilla.org/mozilla-central/rev/3b58a62ebfd9
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Attachment #666805 - Flags: approval-mozilla-aurora+
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: