test: reproduce #1701 — hardcoded mouse button 3/4 navigation cannot be disabled#1702
Open
github-actions[bot] wants to merge 1 commit intomainfrom
Open
test: reproduce #1701 — hardcoded mouse button 3/4 navigation cannot be disabled#1702github-actions[bot] wants to merge 1 commit intomainfrom
github-actions[bot] wants to merge 1 commit intomainfrom
Conversation
…be disabled Adds a failing test co-located with NavigationControls that proves mouse buttons 3 (back) and 4 (forward) are intercepted unconditionally with no user-configurable setting to opt out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What the bug is
NavigationControlsattaches a globalwindowmouseuplistener that unconditionally intercepts mouse button 3 (back) and mouse button 4 (forward) to triggerrouter.history.back()/router.history.forward(). There is no setting, flag, or escape hatch that lets users opt out of this behavior. This conflicts with system-level shortcuts that users commonly assign to those buttons (browser nav, application switching, accessibility tools, etc.).What code is affected
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/components/NavigationControls/NavigationControls.tsx— specifically theuseEffectthat registers themouseuphandler (lines 19–32). Thepackages/local-dbsettings schema (packages/local-db/src/schema/schema.ts) has nomouseNavigationEnabledcolumn, so the behavior cannot be stored or read.What the test does and how it proves the bug
Two co-located failing tests are added in
NavigationControls.test.ts:Schema test — asserts that
settings.mouseNavigationEnabledis defined on the Drizzle table object. Fails (undefined) because the column does not exist in the schema.Handler test — mirrors the current
handleMouseUplogic (no enabled/disabled guard) and asserts that firing button-3/4 events whilemouseNavigationEnabled = falseproduces zeroback/forwardcalls. Fails (length: 1) because the handler has no such guard.Both failures confirm the bug: there is no mechanism to disable mouse button navigation.
Closes #1701