Skip to content

Commit e9df78f

Browse files
authored
Fix Jittery editor mouse wheel zoom when setting window.zoomLevel = 1 (microsoft#227916)
1 parent 034724a commit e9df78f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/base/browser/ui/scrollbar/scrollableElement.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,9 @@ export class MouseWheelClassifier {
165165
}
166166

167167
private _isAlmostInt(value: number): boolean {
168+
const epsilon = Number.EPSILON * 100; // Use a small tolerance factor for floating-point errors
168169
const delta = Math.abs(Math.round(value) - value);
169-
return (delta < 0.01);
170+
return (delta < 0.01 + epsilon);
170171
}
171172
}
172173

0 commit comments

Comments
 (0)