Move wheel event change out of patch
This commit is contained in:
parent
b40722869e
commit
a353a59945
@ -1,3 +1,6 @@
|
||||
import * as dom from "vs/base/browser/dom";
|
||||
import { IDisposable } from "vs/base/common/lifecycle";
|
||||
|
||||
// Firefox has no implementation of toElement.
|
||||
if (!("toElement" in MouseEvent.prototype)) {
|
||||
Object.defineProperty(MouseEvent.prototype, "toElement", {
|
||||
@ -17,3 +20,11 @@ if (!("toElement" in MouseEvent.prototype)) {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const _addDisposableListener = dom.addDisposableListener;
|
||||
const addDisposableListener = (node: Element | Window | Document, type: string, handler: (event: any) => void, useCapture?: boolean): IDisposable => {
|
||||
return _addDisposableListener(node, type === "mousewheel" ? "wheel" : type, handler, useCapture);
|
||||
};
|
||||
|
||||
const target = dom as typeof dom;
|
||||
target.addDisposableListener = addDisposableListener;
|
||||
|
@ -1,16 +1,3 @@
|
||||
diff --git a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts
|
||||
index a6256deeba..69819e0f3a 100644
|
||||
--- a/src/vs/base/browser/ui/scrollbar/scrollableElement.ts
|
||||
+++ b/src/vs/base/browser/ui/scrollbar/scrollableElement.ts
|
||||
@@ -311,7 +311,7 @@ export abstract class AbstractScrollableElement extends Widget {
|
||||
this._onMouseWheel(new StandardWheelEvent(browserEvent));
|
||||
};
|
||||
|
||||
- this._mouseWheelToDispose.push(dom.addDisposableListener(this._listenOnDomNode, 'mousewheel', onMouseWheel));
|
||||
+ this._mouseWheelToDispose.push(dom.addDisposableListener(this._listenOnDomNode, 'wheel', onMouseWheel));
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts b/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
|
||||
index 457818a975..ad45ffe58a 100644
|
||||
--- a/src/vs/code/electron-browser/sharedProcess/sharedProcessMain.ts
|
||||
@ -21,19 +8,6 @@ index 457818a975..ad45ffe58a 100644
|
||||
}
|
||||
+
|
||||
+startup({ machineId: "1" });
|
||||
diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts
|
||||
index 1a8af35373..ae45e08aeb 100644
|
||||
--- a/src/vs/editor/browser/controller/mouseHandler.ts
|
||||
+++ b/src/vs/editor/browser/controller/mouseHandler.ts
|
||||
@@ -121,7 +121,7 @@ export class MouseHandler extends ViewEventHandler {
|
||||
e.stopPropagation();
|
||||
}
|
||||
};
|
||||
- this._register(dom.addDisposableListener(this.viewHelper.viewDomNode, 'mousewheel', onMouseWheel, true));
|
||||
+ this._register(dom.addDisposableListener(this.viewHelper.viewDomNode, 'wheel', onMouseWheel, true));
|
||||
|
||||
this._context.addEventHandler(this);
|
||||
}
|
||||
diff --git a/src/vs/editor/contrib/clipboard/clipboard.ts b/src/vs/editor/contrib/clipboard/clipboard.ts
|
||||
index 5e43f1b39e..7775e3b6da 100644
|
||||
--- a/src/vs/editor/contrib/clipboard/clipboard.ts
|
||||
|
Reference in New Issue
Block a user