Open Bug 594217 Opened 14 years ago Updated 2 years ago

add keyboard shortcut to duplicate (clone) tab

Categories

(Firefox :: Tabbed Browser, enhancement)

enhancement

Tracking

()

REOPENED

People

(Reporter: fryn, Unassigned)

References

Details

Attachments

(1 obsolete file)

Forked from bug 455722 (see bug 455722 comment #35 and bug 455722 comment #35) to avoid bikeshedding, since that bug's patch already got ui-review+.

Klaas Heidstra suggested ctrl+shift+c (shift+cmd+c), which patch v1 uses. I presume that 'c' comes from the word 'clone'.

I considered opt+cmd+t, since it's an alternate way to open a new tab, but it doesn't translate well to Windows and Linux.

(patch v1 also fixes a minor error produced when attempting to undo a closed tab when no browser windows are open.)
Attachment #472860 - Flags: ui-review?(faaborg)
Attachment #472860 - Flags: review?(dao)
Attachment #472860 - Flags: ui-review?(faaborg) → ui-review+
> Klaas Heidstra suggested ctrl+shift+c (shift+cmd+c), which patch v1 uses. I
> presume that 'c' comes from the word 'clone'.

Or 'copy'. Ctrl+c is the standard shortcut for copy, thus adding a shift we have ctrl+shift+c to copy/clone the tab. Has a logic to it.
No longer depends on: 455722
Comment on attachment 472860 [details] [diff] [review]
patch v1 (ctrl+shift+c / shift+cmd+c)

>-    <command id="History:UndoCloseTab" oncommand="undoCloseTab();"/>
>+    <command id="History:UndoCloseTab" oncommand="if (gBrowser) undoCloseTab();"/>
>     <command id="History:UndoCloseWindow" oncommand="undoCloseWindow();"/>
>+
>+    <command id="cmd_duplicateTab"
>+             oncommand="if (gBrowser) duplicateTabIn(gBrowser.selectedTab, 'tab');"/>

Why if (gBrowser)?

This doesn't actually display the shortcut anywhere, so it's pretty much undiscoverable...
(In reply to comment #2)
> Why if (gBrowser)?

On OS X, these shortcuts can be triggered even when no browser window is open.

> This doesn't actually display the shortcut anywhere, so it's pretty much
> undiscoverable...

Sadly true.
(In reply to comment #3)
> (In reply to comment #2)
> > Why if (gBrowser)?
> 
> On OS X, these shortcuts can be triggered even when no browser window is open.

Seems like we should define the <key> only in real browser windows.
(In reply to comment #4)
> Seems like we should define the <key> only in real browser windows.

'Undo close tab' and 'Duplicate tab' would then be the only <key>s outside of browser-sets.inc.

The alternative would be to put the gBrowser check inside the function, but that seems more questionable.
Assignee: fryn → nobody
(In reply to comment #5)
> (In reply to comment #4)
> > Seems like we should define the <key> only in real browser windows.
> 
> 'Undo close tab' and 'Duplicate tab' would then be the only <key>s outside of
> browser-sets.inc.

They can stay there, just need to be set conditionally, using e.g. "#ifdef FULL_BROWSER_WINDOW", which browser.xul would define.
Attachment #472860 - Flags: review?(dao)
> This doesn't actually display the shortcut anywhere, so it's pretty much
> undiscoverable...

Unassigned myself, since I don't think it makes sense to include this shortcut, if we're not going to display it anywhere. I have no objections to a WONTFIX.
Status: ASSIGNED → NEW
WONTFIX for above reasons.
Status: NEW → RESOLVED
Closed: 14 years ago
Depends on: 455722
Resolution: --- → WONTFIX
Attachment #472860 - Attachment is obsolete: true
Overloading the "C" key seems odd, but I could see Control/Command-T (plus modifier) being used... That said, this still seems like a uncommon action best left to an addon.
Uncommon action in general or in Firefox? See Bug 455722, duplicating a tab in Firefox is a non-discoverable feature, while Chrome, Opera and IE all have the action available in tab context menu.
now that https://bugzilla.mozilla.org/show_bug.cgi?id=455722 is fixed - reopening this.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Type: defect → enhancement
See Also: → 1585883
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: