Skip to content

Commit 48a97ab

Browse files
committed
Fix Firefox scrolling
Fixes #976.
1 parent 0ff8a11 commit 48a97ab

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

scripts/vscode.patch

+11-11
Original file line numberDiff line numberDiff line change
@@ -57,27 +57,27 @@ index 6bb695db68..ecbabe5dc8 100644
5757
}
5858
-
5959
diff --git a/src/vs/base/browser/mouseEvent.ts b/src/vs/base/browser/mouseEvent.ts
60-
index 4c7295e3b9..fc9694a18b 100644
60+
index 4c7295e3b9..b0af2cdd62 100644
6161
--- a/src/vs/base/browser/mouseEvent.ts
6262
+++ b/src/vs/base/browser/mouseEvent.ts
63-
@@ -158,7 +158,7 @@ export class StandardWheelEvent {
64-
// vertical delta scroll
65-
if (typeof e1.wheelDeltaY !== 'undefined') {
63+
@@ -160,6 +160,8 @@ export class StandardWheelEvent {
6664
this.deltaY = e1.wheelDeltaY / 120;
67-
- } else if (typeof e2.VERTICAL_AXIS !== 'undefined' && e2.axis === e2.VERTICAL_AXIS) {
68-
+ } else if (browser.isFirefox || (typeof e2.VERTICAL_AXIS !== 'undefined' && e2.axis === e2.VERTICAL_AXIS)) {
65+
} else if (typeof e2.VERTICAL_AXIS !== 'undefined' && e2.axis === e2.VERTICAL_AXIS) {
6966
this.deltaY = -e2.detail / 3;
67+
+ } else if (browser.isFirefox) {
68+
+ this.deltaY = -e.deltaY / 3;
7069
} else {
7170
this.deltaY = -e.deltaY / 40;
72-
@@ -171,7 +171,7 @@ export class StandardWheelEvent {
73-
} else {
74-
this.deltaX = e1.wheelDeltaX / 120;
71+
}
72+
@@ -173,6 +175,8 @@ export class StandardWheelEvent {
7573
}
76-
- } else if (typeof e2.HORIZONTAL_AXIS !== 'undefined' && e2.axis === e2.HORIZONTAL_AXIS) {
77-
+ } else if (browser.isFirefox || (typeof e2.HORIZONTAL_AXIS !== 'undefined' && e2.axis === e2.HORIZONTAL_AXIS)) {
74+
} else if (typeof e2.HORIZONTAL_AXIS !== 'undefined' && e2.axis === e2.HORIZONTAL_AXIS) {
7875
this.deltaX = -e.detail / 3;
76+
+ } else if (browser.isFirefox) {
77+
+ this.deltaX = -e.deltaX / 3;
7978
} else {
8079
this.deltaX = -e.deltaX / 40;
80+
}
8181
diff --git a/src/vs/base/common/network.ts b/src/vs/base/common/network.ts
8282
index 4f93e06df0..ae63e64a7f 100644
8383
--- a/src/vs/base/common/network.ts

0 commit comments

Comments
 (0)