Skip to content

Comments

test: reproduce #1701 — hardcoded mouse button 3/4 navigation cannot be disabled#1702

Open
github-actions[bot] wants to merge 1 commit intomainfrom
triage/issue-1701-22300738105
Open

test: reproduce #1701 — hardcoded mouse button 3/4 navigation cannot be disabled#1702
github-actions[bot] wants to merge 1 commit intomainfrom
triage/issue-1701-22300738105

Conversation

@github-actions
Copy link
Contributor

What the bug is

NavigationControls attaches a global window mouseup listener that unconditionally intercepts mouse button 3 (back) and mouse button 4 (forward) to trigger router.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 the useEffect that registers the mouseup handler (lines 19–32). The packages/local-db settings schema (packages/local-db/src/schema/schema.ts) has no mouseNavigationEnabled column, 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:

  1. Schema test — asserts that settings.mouseNavigationEnabled is defined on the Drizzle table object. Fails (undefined) because the column does not exist in the schema.

  2. Handler test — mirrors the current handleMouseUp logic (no enabled/disabled guard) and asserts that firing button-3/4 events while mouseNavigationEnabled = false produces zero back/forward calls. 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

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable or make configurable mouse forward/back buttons for workspace navigation

0 participants