Home¶
Browser Tricks¶
- Disabling browser right click in extJS (Qichuan)
Ext.get('div').on('contextmenu', function(e) {
rclkMenu.showAt(e.getXY());
e.stopEvent();
});
Code Explanation:
'contextmenu' is the triggered event when user right-click on the 'div' division.
rclkMenu.showAt(e.getXY()) will popup your ExtJS pop menu.
e.stopEvent() disables the default browser right-click menu.
It works both in IE and firefox.