Closed Bug 410569 Opened 17 years ago Closed 16 years ago

Tab duplication (opt+drag) doesn't work on Mac or Linux

Categories

(Firefox :: Tabbed Browser, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: enndeakin)

References

Details

(Keywords: platform-parity, regression, user-doc-complete)

Attachments

(1 file, 1 obsolete file)

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b3pre) Gecko/2008010204 Minefield/3.0b3pre

The tab duplication feature (added recently in bug 298571) doesn't work on Mac.  The tab is moved instead of being copied, and no special cursor appears.  This happens regardless of whether Cmd is depressed before or during the drag.

Originally reported in bug 298571 comment 41 and bug 298571 comment 43.
Flags: blocking-firefox3?
(In reply to comment #0)
> no special cursor appears.

Sounds like drag&drop-copying is fundamentally broken on OS X (or has never been generally implemented) - or that as a non-OS X user I've missed a basic detail. On Windows, hitting Ctrl has always made the cursor change - bug 298571 just added the expected functionality.

Josh: How's d&d supposed to work on OS X WRT copying instead of moving?
The "copy" modifier for drags on Mac should be Option (Alt), not Cmd.

The copy cursor is covered by bug 302403 and bug 358095.
Does this patch fix your issue, then?
No, that patch doesn't make it work.  Maybe we need that patch plus cocoa widget changes?
If none of the modifier keys works for you, then it seems that indeed they're simply not set for the dragdrop event at all. Sounds like a widget bug to me...
Summary: Tab duplication (Cmd+drag) doesn't work on Mac → Tab duplication (opt+drag) doesn't work on Mac
This does not block the final release of Firefox 3.
Flags: wanted-firefox3+
Flags: blocking-firefox3?
Flags: blocking-firefox3-
My extension Duplicate Tab has had this feature for some time now, and it works in Firefox 2. But recently when trying to update my extension for Firefox 3, I noticed it doesn't work anymore on Mac: the modifier keys on the event (e.g. event.metaKey) are always set to false, no matter what modifier key is being pressed during drag.

So this actually is a regression from Firefox 2.

This is on Mac 10.4.8 in VMWare (x86).
Keywords: regression
I can confirm that the drag-copying doesn't work on Mac:
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9pre) Gecko/2008052304 Minefield/3.0pre

If I can give you more information, let me know.
Blocks: 408163
(In reply to comment #7)
> My extension Duplicate Tab has had this feature for some time now, and it works
> in Firefox 2. But recently when trying to update my extension for Firefox 3, I
> noticed it doesn't work anymore on Mac: the modifier keys on the event (e.g.
> event.metaKey) are always set to false, no matter what modifier key is being
> pressed during drag.
> 
> So this actually is a regression from Firefox 2.

Vimperator (FF3 plugin that makes FF act like a Vim-based browser) users have also noticed this. Vimperator is unable to map Cmd-key combinations (nor map things to them). I suspect Vimperator's problem is probably the same as Duplicate Tab's problem. That is, the Cmd key is broken in FF3.

This bug is because the tabbrowser code is manually checking the keyboard state instead of properly checking the drag action.
Assignee: nobody → enndeakin
Attachment #295314 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #338672 - Flags: review?(mconnor)
Summary: Tab duplication (opt+drag) doesn't work on Mac → Tab duplication (opt+drag) doesn't work on Mac or Linux
Flags: wanted-firefox3.1?
Blocks: 455176
Comment on attachment 338672 [details] [diff] [review]
check drop effect

r=mano
Attachment #338672 - Flags: review?(mconnor) → review+
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Keywords: user-doc-needed
Option-Drag is not copying for me - just moves the tab.
Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.1b1pre) Gecko/20080925021213 Minefield/3.1b1pre - Build ID: 20080925021213
Ctrl + Drag Link not opening new tab.....

_setEffectAllowedForDataTransfer set dropEffect to "link" here.....
for (var i=0; i < this._supportedLinkDropTypes.length; i++) {
  if (types.contains(this._supportedLinkDropTypes[i])) {
    // Here we need to to do this manually
    return dt.effectAllowed = dt.dropEffect = "link";
  }
}

then in _onDrop this will never true
if (document.getBindingParent(aEvent.originalTarget).localName != "tab" || dropEffect == "copy") {
  // We're adding a new tab.
  newIndex = this.getNewIndex(aEvent);
  newTab = this.loadOneTab(getShortcutOrURI(url), null, null, null, bgLoad, false);
  this.moveTabTo(newTab, newIndex);
}
Flags: wanted-firefox3.1?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: