##// END OF EJS Templates
Fixes context menu with Opera (#1655)....
Jean-Philippe Lang -
r1761:e395d3e46dd6
parent child
Show More
@@ -28,7 +28,7 ContextMenu.prototype = {
28 RightClick: function(e) {
28 RightClick: function(e) {
29 this.hideMenu();
29 this.hideMenu();
30 // do not show the context menu on links
30 // do not show the context menu on links
31 if (Event.findElement(e, 'a') != document && Event.findElement(e, 'a') != undefined) { return; }
31 if (Event.element(e).tagName == 'A') { return; }
32 // right-click simulated by Alt+Click with Opera
32 // right-click simulated by Alt+Click with Opera
33 if (window.opera && !e.altKey) { return; }
33 if (window.opera && !e.altKey) { return; }
34 var tr = Event.findElement(e, 'tr');
34 var tr = Event.findElement(e, 'tr');
@@ -44,7 +44,7 ContextMenu.prototype = {
44
44
45 Click: function(e) {
45 Click: function(e) {
46 this.hideMenu();
46 this.hideMenu();
47 if (Event.findElement(e, 'a') != document && Event.findElement(e, 'a') != undefined ) { return; }
47 if (Event.element(e).tagName == 'A') { return; }
48 if (window.opera && e.altKey) { return; }
48 if (window.opera && e.altKey) { return; }
49 if (Event.isLeftClick(e) || (navigator.appVersion.match(/\bMSIE\b/))) {
49 if (Event.isLeftClick(e) || (navigator.appVersion.match(/\bMSIE\b/))) {
50 var tr = Event.findElement(e, 'tr');
50 var tr = Event.findElement(e, 'tr');
General Comments 0
You need to be logged in to leave comments. Login now