Closed Bug 330013 Opened 18 years ago Closed 18 years ago

Dragging a link to the tab bar opens in the currently focused tab, not a new tab

Categories

(Firefox :: Tabbed Browser, defect)

x86
Linux
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: smontagu, Assigned: smaug)

References

Details

Attachments

(1 file)

Drag a link to the tab bar, to the right of all currently open tabs.

Expected result: the link is loaded into a newly created tab.
Actual result: the target loads in the currently focused tab.

This is a regression from bug 324335.
Well, I can't reproduce this, I get the expected result. Maybe this is a Linux only problem?
In my build aEvent.originalTarget.localName is always tabbrowser, whether I drop on the tab bar or an existing tab. 

document.getBindingParent(aEvent.originalTarget) is always null.
(In reply to comment #2)
> document.getBindingParent(aEvent.originalTarget) is always null.
So you get a js error in the console then?

Weird that for you aEvent.originalTarget.localName is always tabbrowser.
Do you use some special theme or something?
(In reply to comment #3)

> So you get a js error in the console then?

No, I don't, which is something I don't understand.
 
> Weird that for you aEvent.originalTarget.localName is always tabbrowser.
> Do you use some special theme or something?

No, and I get the same result in a clean profile. 

OK, I figured out the console issue: if I set javascript.options.showInConsole to true, I get Error: document.getBindingParent(aEvent.originalTarget) has no properties
Source File: chrome://global/content/bindings/tabbrowser.xml
Line: 1652
Ah yes, you should have turned that on.
So if you back out the patch for bug 324335, you get bug 324335 back, right?
I really have no idea why you get this problem, so I can't really help :(
It seems likely that the underlying problem here (i.e. the target always being tabbrowser) was caused by bug 308936, but it will take some time to test that assumption since the patch doesn't cleanly reverse-apply. It doesn't happen on my 1.8 branch build from January 31.
> It seems likely that the underlying problem here (i.e. the target always being
> tabbrowser) was caused by bug 308936.

That would be bug 308396.
Apparently not bug 308396 either. In a build pulled by date from 2006-01-19 and then attachment 209152 [details] [diff] [review] applied I can't reproduce the bug.
No longer blocks: 324335
I've located a regression window between 2006-03-06 and 2006-03-08, which seems to point at bug 234455. I thought the patch from bug 330190 might fix it, but it seems it doesn't :(
Blocks: 234455
I see this in Linux only, not in Windows. Drag-and-Drop events are handled somehow in a bit different way. Hmm, my windows build was a cairo, Linux build old-style
gtk2 - could that cause any difference?
The bug is there also with cairo-gtk2.
Haven't yet found the reason why the event is dispatched to wrong target.
(That is the problem as far as I understand, event dispathing seems to work properly.)
Attached patch proposed patchSplinter Review
Assignee: nobody → smaug
Status: NEW → ASSIGNED
Attachment #214831 - Flags: superreview?(bzbarsky)
Attachment #214831 - Flags: review?(bzbarsky)
So the problem is that dnd code in nsWindow (gtk/gtk2) reuses nsEvents.
Comment on attachment 214831 [details] [diff] [review]
proposed patch

r+sr=bzbarsky
Attachment #214831 - Flags: superreview?(bzbarsky)
Attachment #214831 - Flags: superreview+
Attachment #214831 - Flags: review?(bzbarsky)
Attachment #214831 - Flags: review+
Checking in nsPresShell.cpp;
/cvsroot/mozilla/layout/base/nsPresShell.cpp,v  <--  nsPresShell.cpp
new revision: 3.900; previous revision: 3.899
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: