Skip to content

[Bug]: Left click becomes right-click; sidebar threads unclickable until Ctrl+Escape #11066

Description

@KarstenKreh

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/desktop

Steps to reproduce

I do not have a deterministic first trigger. It happens often during normal use of the desktop app, especially around the left sidebar (projects / threads). After it starts, every left click behaves like a right click.

Related tickets I found (same menu, different symptom, all closed): #2053, #2535, #285, #3698. Those describe a misplaced menu or an item firing on open. This report is the stuck state that follows: left click stays in right-click mode and the thread list stops accepting selection.

Expected behavior

A left click selects the thread or UI control under the cursor. A right click opens the context menu. After the menu closes, left click works again.

Actual behavior

Left click starts opening context menus (or otherwise acting as a right click). Threads in the left sidebar cannot be selected. Escape or clicking around sometimes clears it. Closing T3 Code often does not. Ctrl+Escape consistently restores normal left-click behavior.

That looks like a leftover context-menu listener or compositor pointer grab. Ctrl+Escape may just force a focus change that drops the grab; I am not claiming it is an intentional T3 shortcut.

Impact

Major degradation or frequent failure

Version or commit

v0.0.40 (Linux AppImage T3-Code-0.0.40-x86_64.AppImage)

Environment

Pop!_OS 24.04 LTS, COSMIC desktop, Wayland, T3 Code desktop AppImage v0.0.40

Workaround

Ctrl+Escape resets the stuck state and left click works again. Escape alone or clicking around only helps sometimes. Restarting the app is unreliable.

Created with AI · Commissioned by Karsten.

Activity

  1. juliusmarminge commented on Sep 10, 2026

    @juliusmarminge
    Member

    Triage

    Confirmed as a real desktop bug, not a duplicate of the closed sidebar-menu tickets.

    What this report is

    On Pop!_OS 24.04 COSMIC / Wayland (AppImage v0.0.40), left click sometimes starts opening context menus (or otherwise behaving as a right click). Sidebar threads stop selecting. Escape / clicking around / restarting the app is unreliable. Ctrl+Escape consistently restores normal left-click behavior.

    That stuck state is distinct from:

    Those are the same menu surface, different failure modes. This issue is the leftover “right-click mode” after the menu is gone.

    Likely cause

    The desktop app always uses native Electron Menu.popup() when desktopBridge is present (apps/web/src/localApi.ts → apps/desktop/src/electron/ElectronMenu.ts). There is no Linux/Wayland special case. contextMenu.close() is a no-op on desktop, and the native path never calls menu.closePopup().

    The web DOM fallback (apps/web/src/contextMenuFallback.ts) is not used by this AppImage. Leftover renderer listeners are a poor fit: they would not survive a full process restart, and leftover sidebar drag listeners would block clicks rather than turn left click into right-click.

    This lines up with a COSMIC/Wayland pointer grab left behind by Electron’s native GTK popup. COSMIC’s compositor Escape path unsets pointer/keyboard grabs. Ctrl+Escape is not a T3 shortcut; Escape can be swallowed by a still-grabbing (possibly invisible) native menu, which would explain why Ctrl+Escape is the reliable reset.

    Related but unmerged: #6440 would have routed Linux through the themed renderer fallback and avoided native GTK popups. #3025 only hardened the web fallback.

    Also adjacent upstream: Electron Wayland mouse-state leftovers after right-click (electron#48656 / electron#48752).

    Next step

    Keep this open. Investigate native Menu.popup() grab lifetime on COSMIC/Wayland. Practical T3 mitigations:

    1. Use the renderer fallback on Linux (especially Wayland), as fix(web): theme context menus on Windows and Linux #6440 proposed.
    2. Track the live Menu and call closePopup(); make desktop contextMenu.close() actually dismiss it.

    Helpful checks (if easy)

    1. Does the stuck state always start after a sidebar right-click (even a “successful” one)?
    2. Does ELECTRON_OZONE_PLATFORM_HINT=x11 (or an X11 session) avoid it?
    3. Do other Electron apps on this COSMIC session get the same leftover right-click mode?
    4. After it sticks, do left clicks open context menus outside T3 Code as well, or only inside the app?

    Workaround: Ctrl+Escape, as reported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.upstreamvia-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions