Closed Bug 642604 Opened 13 years ago Closed 13 years ago

window.close() from a content tab closes Fennec window

Categories

(Firefox for Android Graveyard :: Extension Compatibility, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jwkbugzilla, Assigned: mbrubeck)

References

Details

(Whiteboard: [fennec-4.1?][has patch])

Attachments

(1 file)

This is the Fennec equivalent of bug 503299. It seems that webpages cannot call window.close(), it won't work even for pop-up windows. However, a chrome page loaded into the browser (typically an extension page) has the necessary privileges. Instead of closing a single tab it will close the entire Fennec window. Fennec should be intercepting DOMWindowClose event in the <browser> tag and closing a single tab.
Nominating for Fennec 4.next / Fennec 5.
tracking-fennec: --- → ?
tracking-fennec: ? → 2.0next+
tracking-fennec: 2.0next+ → ---
Whiteboard: [fennec-4.1?]
Fennec does listen for the DOMWindowClose event, and sends a message to the parent process which tries to close a tab. Local (about:) pages should also send the message. Something must be getting messed up.
In addition to sending a message from the frame script, we probably need to catch the event in the parent process (when it bubbles from a local tab to its <browser>) and stopPropagation.
Attached patch patchSplinter Review
There's just a simple JavaScript error in our DOMWindowClosed handler, which means we aren't calling preventDefault when we want to.
Assignee: nobody → mbrubeck
Status: NEW → ASSIGNED
Attachment #520268 - Flags: review?(mark.finkle)
Whiteboard: [fennec-4.1?] → [fennec-4.1?][has patch]
Comment on attachment 520268 [details] [diff] [review]
patch

oh how I wish we saw this 2 days ago
Attachment #520268 - Flags: review?(mark.finkle) → review+
http://hg.mozilla.org/mobile-browser/rev/707a52a816f0
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Verified fixed on:
Mozilla/5.0 (Android;Linux armv7l;rv:8.0a1)Gecko/20110905
Firefox/8.0a1 Fennec/8.0a1
Device: Samsung Galaxy S
OS: Android 2.2
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: