Skip to content

fix: keep double-click selections inside the message - #29

Merged
gitautas merged 5 commits into
mainfrom
fix/clamp-multiclick-selection
Oct 18, 2026
Merged

gitautas merged 5 commits into
mainfrom
fix/clamp-multiclick-selection

Conversation

@gitautas

Copy link
Copy Markdown
Owner

What

Double- or triple-clicking a message to copy it also selected the composer's draft text, so ⌘C copied both.

Why

The body is user-select: none, and only .selectable areas allow selecting. WebKit's word/paragraph selection doesn't stop at the edge of a selectable area. On the last message it ran on through the unselectable chrome into the composer.

Change

  • New src/lib/selection.ts: a mouseup listener that, for multi-clicks only (detail >= 2), trims the selection to the .selectable element it started in.
  • Installed once in main.tsx.
  • Single-click drags are untouched, so selecting across several messages still works.

Testing

  • tsc passes.
  • Not yet checked in the running app.

🤖 Generated with Claude Code

gitautas and others added 5 commits October 17, 2026 21:38
Full width behind a dimmed backdrop instead of a 340px popover clamped
to the left edge, no keyboard on open, finger-sized cells and tone
buttons, and lifted above the keyboard while searching.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SwiftPM 6.4's swift-build backend appends macOS -sdk/-target after
swift-rs's iOS overrides, so Tauri's Swift package compiles against
AppKit and fails on OpenGLES/EAGL.h. npm run ios / ios:build now put
scripts/ios-shim first on PATH, which adds --build-system native.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drops the header info button on phones; the avatar and name become the
way into room info instead. Desktop keeps the button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A light impact on every reaction (chip, action sheet, picker) and a
medium one when a long-press opens the message sheet. Uses
tauri-plugin-haptics, compiled and permitted on Android and iOS only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WebKit's word/paragraph selection doesn't stop at the edge of a
.selectable island in the user-select:none body, so multi-clicking the
last message ran the selection into the composer and copied the draft.
Clamp double/triple-click selections to the element they started in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gitautas
gitautas merged commit 4e44273 into main Oct 18, 2026
2 checks passed
@gitautas
gitautas deleted the fix/clamp-multiclick-selection branch October 18, 2026 21:39
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.

1 participant