Note: There are a few cases of duplicates in user autocompletion which are being worked on.

content api for closing panels

RESOLVED FIXED in Firefox 17

Status

()

Firefox
SocialAPI
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mixedpuppy, Assigned: markh)

Tracking

Trunk
Firefox 18
Points:
---

Firefox Tracking Flags

(firefox17+ fixed)

Details

(Whiteboard: [Fx17])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
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.
(Reporter)

Comment 1

5 years ago
This is related to but not dependent on bug 794640
tracking-firefox17: --- → ?
(Assignee)

Comment 2

5 years ago
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
(Reporter)

Comment 3

5 years ago
cool, I would much prefer window.close.  iirc we pass back the window object on any opening api.

Updated

5 years ago
tracking-firefox17: ? → +
(Assignee)

Comment 4

5 years ago
Created attachment 666805 [details] [diff] [review]
Have window.close() close panels and chats

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
(Assignee)

Comment 6

5 years ago
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

Comment 7

5 years ago
https://hg.mozilla.org/mozilla-central/rev/3b58a62ebfd9
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 18
Attachment #666805 - Flags: approval-mozilla-aurora+
https://hg.mozilla.org/releases/mozilla-aurora/rev/94b299dc86b0
status-firefox17: --- → fixed
You need to log in before you can comment on or make changes to this bug.