diff --git a/client/input_manager.ts b/client/input_manager.ts index dd6b440..fc664fd 100644 --- a/client/input_manager.ts +++ b/client/input_manager.ts @@ -171,9 +171,14 @@ export class InputManager { this.mouse_buttons_released.add(e.button); }); + // ctrl+scroll (and pinching a trackpad, which browsers send as that) would zoom the page. only a listener that + // isn't passive can stop it, and on the window they're passive unless told otherwise self.addEventListener("wheel", (e) => { + if (e.ctrlKey) { + e.preventDefault(); + } this.wheel_delta += e.deltaY; - }); + }, { passive: false }); document.addEventListener("mousemove", (e) => { e.preventDefault();