дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-04 09:11:10 +02:00
fix(ui): retain dialog focus and copy text through the native clipboard (#2403)
Refs #2381 - Dialogs: an editor opened behind a dialog (e.g. the new file's tab behind "Add File to Git") could take keyboard focus after the dialog opened, so Enter/Escape went to the editor. Dialogs now keep focus while they are the top layer. - Copy Reference failed with NotAllowedError: the WebView clipboard requires user activation, which native menu actions and async work (resolving the reference) outlive. Text copies now go through a native clipboard_write_text command (NSPasteboard / Win32 / GTK), and every navigator.clipboard.writeText caller uses the shared helper. The command is allowed in restricted (untrusted) projects like the other clipboard commands.
Цей коміт міститься в:
1 джерело
6b4be5a15b
коміт
4392ffacf6
51 files changed
+406
-88
No files matched your search
@@ -4,6 +4,7 @@
|
||||
* the diff viewer (`vcs.openDiff`; `diff/` shows its review threads). Long operations run
|
||||
* one at a time and are shown in the tool window's banner (`useGhBusy`), cancellable.
|
||||
*/
|
||||
import { writeClipboardText } from "@/platform/clipboard";
|
||||
import { Channel } from "@tauri-apps/api/core";
|
||||
import { create } from "zustand";
|
||||
import { withChain, type DiffData } from "@/features/vcs/diffInput";
|
||||
@@ -178,7 +179,7 @@ export function openInBrowser(url: string): Promise<void> {
|
||||
|
||||
/** "Copy Pull Request URL". */
|
||||
export async function copyUrl(url: string): Promise<void> {
|
||||
await navigator.clipboard?.writeText(url);
|
||||
await writeClipboardText(url);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Заблокувати користувача