Commit Graph

6 Commits (a4cb73db848c733a5fb686038a90abe6d175aabe)

Author SHA1 Message Date
Lukas c7d5d1b9fc
macOS: make text editor in clipboard confirmation non focusable (#9400)
With its being `focusable`(default), the first responder became the text
editor instead of the paste button.

This fixes the issue where one can't confirm with the keyboard.

This doesn't affect its selection.
2025-10-29 21:30:03 -07:00
Mitchell Hashimoto 5c574e7745
macos: use TextEditor instead of Text for clipboard confirmation (#9324)
Fixes #9322

SwiftUI `Text` has huge performance issues. On my maxed out MBP it hangs
for any text more than 100KB (it took ~8s to display it!). `TextEditor`
with a constant value works much better and handles scrolling for us,
too!
2025-10-23 09:22:35 -07:00
Mitchell Hashimoto f9bd009ce5
macos: unhide cursor on clipboard confirmation 2024-09-21 09:59:40 -07:00
Thorsten Ball b7a715ec86 macos: allow submitting clipboard confirmation with return
Before this change I couldn't submit the dialog with return. Or
cmd+return.

From what I understand the problem was that the `TextEditor` always
steals the default focus. I tried a bunch of workarounds I found to set
the default focus on the button, but none of them worked.

Then I thought: do we even need a full-on Text*Editor*? So I switched
`TextEditor` to `Text` with a `ScrollView`: things look the same, text
is selectable and scrollable, but I can hit return to submit the dialog.
2024-01-10 06:58:56 +01:00
Gregory Anders 98b43007a0 core: use ClipboardRequestType instead of ClipboardPromptReason
Instead of making a separate enum that must be translated from the
ClipboardRequest type, simply re-use ClipboardRequest to determine the
clipboard confirmation reason.
2023-11-10 23:12:39 -05:00
Gregory Anders 86245ff0cf macos: add option to prompt user for confirmation on OSC 52 commands 2023-11-10 23:12:39 -05:00