Skip to content

fix: stop click handlers firing after long-press and drag-select - #1386

Merged
7w1 merged 1 commit into
SableClient:devfrom
eleboucher:fix/selection-and-longpress-dedup
Jul 27, 2026
Merged

fix: stop click handlers firing after long-press and drag-select#1386
7w1 merged 1 commit into
SableClient:devfrom
eleboucher:fix/selection-and-longpress-dedup

Conversation

@eleboucher

@eleboucher eleboucher commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Description

Long-press on a room/space nav item opened the context menu, but the synthetic click that followed navigated and immediately dismissed it. Guard the click path with menu.consumeLongPressFired() (RoomNavItem, SpaceTabs).

Drag-selecting across an abbreviation or mention link fired click on mouseup, toggling the tooltip or navigating away and killing the selection. Guard those handlers with a collapsed-selection check (AbbreviationTerm, useMentionClickHandler) and make abbreviation text selectable on desktop only (mobile keeps userSelect:none so the long-press context menu isn't hijacked by the native callout).

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

AI disclosure:

  • Partially AI assisted (clarify which code was AI assisted and briefly explain what it does).
  • Fully AI generated (explain what all the generated code does in moderate detail).

@eleboucher
eleboucher requested review from 7w1 and hazre as code owners July 26, 2026 17:49
@7w1 7w1 added the internal label Jul 27, 2026
@eleboucher
eleboucher force-pushed the fix/selection-and-longpress-dedup branch from 17ce832 to 4676e2f Compare July 27, 2026 06:28
Long-press on a room/space nav item opened the context menu, but the
synthetic click that followed navigated and immediately dismissed it.
Guard the click path with menu.consumeLongPressFired() (RoomNavItem,
SpaceTabs).

Drag-selecting across an abbreviation or mention link fired click on
mouseup, toggling the tooltip or navigating away and killing the
selection. Guard those handlers with a collapsed-selection check
(AbbreviationTerm, useMentionClickHandler) and make abbreviation text
selectable on desktop only (mobile keeps userSelect:none so the
long-press context menu isn't hijacked by the native callout).
@eleboucher
eleboucher force-pushed the fix/selection-and-longpress-dedup branch from 4676e2f to 249977a Compare July 27, 2026 06:30
@7w1
7w1 added this pull request to the merge queue Jul 27, 2026
Merged via the queue into SableClient:dev with commit 677717b Jul 27, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants