Opened 2 years ago

Last modified 18 months ago

#18915 new defect

cannot detect right-click on dom element

Reported by: eynugget Owned by:
Priority: undecided Milestone: 1.14
Component: Core Version: 1.11.2
Keywords: Cc:
Blocked By: Blocking:

Description

In the code below, the right-click is not getting trapped. left-click works fine. This code was given in the dojo documentation. Can someone tell me why isRight is not working? Essentially, when I right-click the element, I just get the browser's right-click menu, no console message is generated.

https://dojotoolkit.org/reference-guide/1.10/dojo/mouse.html

on(myNode,'click',function(e) {
        if (mouse.isLeft(e)){
          console.log("left click", e);
        } else if (mouse.isRight(e)){
          console.log("right click",e);
        }
});

Furthermore, it would be great if there was a functional demo on this and

Change History (4)

comment:1 Changed 2 years ago by dylan

Milestone: tbd1.12.1

comment:2 Changed 2 years ago by dylan

Milestone: 1.12.11.12.2

Moving 1.12.1 tickets to 1.12.2

comment:3 Changed 2 years ago by dylan

Milestone: 1.12.21.12.3

comment:4 Changed 18 months ago by dylan

Milestone: 1.12.31.14
Note: See TracTickets for help on using tickets.