Repository navigation
macOS: drag and drop no longer uses bracketed paste since #13817 #13979
DescriptionSince #13817, file paths delivered by drag and drop on macOS are no longer wrapped in bracketed paste. They now arrive as simulated typing, so programs that distinguish pasted input from typed input treat a dropped file as ordinary keystrokes. The concrete symptom: dropping an image onto Claude Code used to produce an image attachment ( Cause#13817 ("macos: send all - surfaceModel.sendText(chars)
+ _ = committedTextAction(GHOSTTY_ACTION_PRESS, text: chars)The commit message states the rationale and the assumption behind it:
That last assumption does not hold. override func performDragOperation(_ sender: any NSDraggingInfo) -> Bool {
let pb = sender.draggingPasteboard
let content = pb.getOpinionatedStringContents()
if let content {
DispatchQueue.main.async {
self.insertText(
content,
replacementRange: NSRange(location: 0, length: 0)
)
}
return true
}
return false
}So file drops share the code path that was intentionally converted from paste semantics to typed input. Dictation was the target; drag and drop was affected as collateral. Reproduction
Expected: the dropped path is delivered as a bracketed paste, as it was before #13817. VersionmacOS 26.6.2 (build 25G83, Darwin 25.6.0), Apple Silicon (arm64). Confirmed by Suggested fixKeep the key event path for genuine input method commits, but let Happy to test a patch on tip. |
Thanks, fixed here #13999