Patch #7700 ยป opera_rightclick.patch
public/javascripts/context_menu.js | ||
---|---|---|
11 | 11 | |
12 | 12 |
if (!observingContextMenuClick) { |
13 | 13 |
Event.observe(document, 'click', this.Click.bindAsEventListener(this)); |
14 |
Event.observe(document, (window.opera ? 'click' : 'contextmenu'), this.RightClick.bindAsEventListener(this));
|
|
14 |
Event.observe(document, 'contextmenu', this.RightClick.bindAsEventListener(this));
|
|
15 | 15 |
observingContextMenuClick = true; |
16 | 16 |
} |
17 | 17 |
|
... | ... | |
23 | 23 |
this.hideMenu(); |
24 | 24 |
// do not show the context menu on links |
25 | 25 |
if (Event.element(e).tagName == 'A') { return; } |
26 |
// right-click simulated by Alt+Click with Opera |
|
27 |
if (window.opera && !e.altKey) { return; } |
|
28 | 26 |
var tr = Event.findElement(e, 'tr'); |
29 | 27 |
if (tr == document || tr == undefined || !tr.hasClassName('hascontextmenu')) { return; } |
30 | 28 |
Event.stop(e); |
... | ... | |
39 | 37 |
Click: function(e) { |
40 | 38 |
this.hideMenu(); |
41 | 39 |
if (Event.element(e).tagName == 'A') { return; } |
42 |
if (window.opera && e.altKey) { return; } |
|
43 | 40 |
if (Event.isLeftClick(e) || (navigator.appVersion.match(/\bMSIE\b/))) { |
44 | 41 |
var tr = Event.findElement(e, 'tr'); |
45 | 42 |
if (tr!=null && tr!=document && tr.hasClassName('hascontextmenu')) { |