Closed Bug 712184 Opened 14 years ago Closed 12 years ago

Setting a panel as the dragImage with a mouse cursor located inside of the panel breaks drag events on the browser UI

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: jaws, Assigned: enndeakin)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Using the following markup: > <xul:panel type="drag" allowevents="false" style="pointer-events: none;"><xul:label value="Hello, world!" /></xul:panel> If I call |event.dataTransfer.setDragImage(panel, 5, 5)|, I am unable to get any drag events on top of the the browser chrome. However, if I change the cursor coordinates {-1, -1}, then the drag events work as expected. I have attached a patch that reproduces this behavior. To repro, apply the patch, build /browser/base && /browser/themes, then try dragging the bookmark star to the bookmarks toolbar. If the cursor coordinates are changed to {-1, -1}, then the drag item will correctly be dragged to the bookmarks toolbar.
Neil, this is the drag panel problem that I brought up when attempting to implement tab animations.
Does it work if you set noautohide="true" ? If so, then we may just need to adjust nsXULPopupManager::GetVisiblePopups to check IsDragPopup in both loops.
(In reply to Neil Deakin from comment #2) > Does it work if you set noautohide="true" ? Unfornately not. I set noautohide="true" on the panel and changed the call to setDragImage to use the coordinates of {10, 10}, but the cursor is now the "not-allowed" style while dragging the panel.
Blocks: 742441
Blocks: 759461
No longer blocks: 742441
Neil, do you think you could help greatwarrior here with fixing this bug?
Assignee: nobody → amod.narvekar
Status: NEW → ASSIGNED
Flags: needinfo?(enndeakin)
thank you for allowing me to work on this bug. But I am not clear with what exactly the bug is about. Can anyone explain it to me in detail ? Thanks !
Attached file Testcase
This is a testcase that shows the behaviour. Dragging the popup should highlight the red boxes in blue when hovering over them. The bug is that the mouse events are getting sent to blocked to/by the drag feedback image. Changing the arguments to setDragImage to -20, -20 makes it work as this causes the drag feedback image to be offset from the mouse cursor. I can help but note that this isn't a simple bug and requires digging into platform specific event handling code.
Flags: needinfo?(enndeakin)
Attachment #730309 - Attachment mime type: application/vnd.mozilla.xul+xml → text/plain
I would prefer to keep the assignee to default until i make some significant contribution... I am currently studying the test case. Actually I am not well-versed with XUL.
Assignee: amod.narvekar → nobody
Status: ASSIGNED → NEW
Whiteboard: p=0
This should have been fixed by 943759: Use: <panel type="drag" mousethrough="always"/>
Depends on: 943759
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee: nobody → enndeakin
Target Milestone: --- → mozilla29
No longer blocks: fxdesktopbacklog
Whiteboard: p=0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: