eleven / messenger Public

mac: the composer accepts the activation click (#1070)

* mac: the composer accepts the activation click

Clicking into the backgrounded app on the composer only activated the
app — macOS swallows the activation click unless the view opts in, so
the click that felt ignored never reached any view (ClickLab: dead-spell
activations with ZERO mouseDowns logged). With the post-activation
render hitch delaying the caret, that swallow reads as a dead composer.
acceptsFirstMouse, like Messages' input.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix the merge: single ClickThroughLabel-typed placeholder declaration

---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Paul Campbell 779fe8a62de21097ce9c20f6ceef59821467bcff parent 631ab75
1 file changed, +8 −0
  • ios/LChatMac/MacComposerField.swift +8 −0
diff --git a/ios/LChatMac/MacComposerField.swift b/ios/LChatMac/MacComposerField.swift
index 6519e17..c344a68 100644
--- a/ios/LChatMac/MacComposerField.swift
+++ b/ios/LChatMac/MacComposerField.swift
@@ -312,6 +312,14 @@ final class MacComposerController {
// The NSTextView itself: hand-assembled TextKit stack, placeholder, guarded
// pastes. Plain text at this stage — the rich toggles return in a later PR.
final class ComposerTextView: NSTextView {
+ // The click that brings the app forward should LAND, not just activate:
+ // without this, entering the app by clicking the composer eats the click
+ // (macOS's activation-click swallow), which reads as a dead composer —
+ // especially when the post-activation re-render hitch delays the caret.
+ // Messages accepts its composer's first mouse; so do we.
+ override func acceptsFirstMouse(for event: NSEvent?) -> Bool { true }
+
+
// The placeholder is decoration, and decoration must be click-through
// (the FrostedBand rule): a plain NSTextField label hit-tests but its
// mouseDown neither focuses anything nor forwards up the chain — and the