Browse Source

fixed previous commit

Nicolas Cannasse 6 năm trước cách đây
mục cha
commit
df84ca1ed3
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      hxd/Window.js.hx

+ 6 - 1
hxd/Window.js.hx

@@ -60,11 +60,16 @@ class Window {
 				e.stopPropagation();
 				e.preventDefault();
 			});
-			element.oncontextmenu = canvas.oncontextmenu = function(e){
+			canvas.oncontextmenu = function(e){
 				e.stopPropagation();
 				e.preventDefault();
 				return false;
 			};
+			element.addEventListener("contextmenu",function(e) {
+				e.stopPropagation();
+				e.preventDefault();
+				return false;
+			});
 		}
 		curW = this.width;
 		curH = this.height;