Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#7095 closed defect (invalid)

oncontextmenu for dnd nodes fails on ff3/mac

Reported by: guest Owned by: Eugene Lazutkin
Priority: high Milestone:
Component: DnD Version: 1.1.1
Keywords: contextmenu, oncontextmenu, dndSource, dnd.Selector Cc:
Blocked By: Blocking:

Description

I'm using a dndSource and want to attach oncontextmenu an onclick events to its nodes:

bindMenuToNode = function(mapEntry, divId, map) {
    node = dojo.byId(divId);
    dojo.connect(node, "oncontextmenu", function(e) {
        console.log("oncontextmenu event: ", e);
    });
    dojo.connect(node, "onclick", function(e) {
        console.log("onclick event: ", e);
    });
}
dndSource.forInItems(bindMenuToNode);

This works fine for the onclick event and it does work on all browsers except Firefox 3 / Mac for the oncontextmenu event.

Strangely it does work when using ctrl-click, apples replacement for the right mouse button. It's no driver problem, because it is the same for all mice and computers I've tested it with.

I figured out that commenting out the dojo.stopEvent() within dojo.dnd.Selector's onMouseDown method makes the oncontextmenu fire as it should.

I'm not quite sure wether this is an event problem rather than a DnD problem.

Best regards

Stefan Motz
motz at divis-hagen.de

Change History (3)

comment:1 Changed 11 years ago by guest

I jsut tried http://unixpapa.com/js/testmouse.html Maybe it is a Firefox issue rather than dojo's fault, because the oncontextmenu event isn't fired here as well.

comment:2 Changed 11 years ago by Eugene Lazutkin

Resolution: invalid
Status: newclosed

This is a non-standard event with a spotty implementation. See http://www.quirksmode.org/dom/events/contextmenu.html for more details.

comment:3 Changed 11 years ago by Eugene Lazutkin

Priority: highnormal
severity: majornormal
Note: See TracTickets for help on using tickets.