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

Can't duplicate a tab with designMode and no body

VERIFIED FIXED in Firefox 15

Status

()

Firefox
Session Restore
VERIFIED FIXED
5 years ago
5 years ago

People

(Reporter: pauly, Assigned: zpao)

Tracking

Trunk
Firefox 15
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [fixed-in-fx-team], URL)

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
STR:
1. Open https://bug713417.bugzilla.mozilla.org/attachment.cgi?id=584240
2. Try to duplicate the tab (hold CTRL key and drag the tab to the right)

Actual results:
Nothing happens

Expected results:
The tab should duplicate

Note:
Reproducible on FF 14 (2012-03-26) on all platforms
(Reporter)

Updated

5 years ago

Comment 1

5 years ago
The error console shows:

Error: uncaught exception: [Exception... "'[JavaScript Error: "aContent.document.body is null" {file: "resource:///components/nsSessionStore.js" line: 2176}]' when calling method: [nsISessionStore::duplicateTab]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: chrome://browser/content/tabbrowser.xml :: duplicateTab :: line 2189"  data: yes]

http://hg.mozilla.org/mozilla-central/annotate/a30fd69f1e0c/browser/components/sessionstore/src/nsSessionStore.js#l2193 assumes the document has a body element, and throws when the assumption doesn't hold.

(To reproduce on Mac, hold Option rather than Ctrl.)
Summary: Duplicate tabs doesn't always work → Can't duplicate a tab with designMode and no body
Version: 12 Branch → Trunk
Created attachment 609890 [details] [diff] [review]
Patch v0.1

This does the trick. I covered both ends - saving & restoring - in case we do save data & try to restore into a document we no longer can.
Assignee: nobody → paul
Attachment #609890 - Flags: review?(dietrich)
Comment on attachment 609890 [details] [diff] [review]
Patch v0.1

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

looks good. should be easily testable, will r+ with that.
Attachment #609890 - Flags: review?(dietrich) → feedback+
Created attachment 626593 [details] [diff] [review]
Patch v0.2

Cleaning out my assigned bugs and this was easy enough to finish up.
Attachment #626593 - Flags: review?(ttaubert)
Attachment #626593 - Flags: review?(ttaubert) → review+
https://hg.mozilla.org/integration/fx-team/rev/41fdd17ee9d3
Status: NEW → ASSIGNED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 15
https://hg.mozilla.org/mozilla-central/rev/41fdd17ee9d3
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
(Reporter)

Comment 7

5 years ago
Duplication works ok now. Verified fixed on FF 15.0a1 (2012-05-27) on Win 7, Ubuntu 12.04 and Mac OS X 10.6.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.