From 1bfc32a3b2f31b962ce8a5c611b60cb008360923 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Thu, 9 Dec 2021 06:03:21 +0200 Subject: [PATCH] fix(api.js): add `fileDropEnabled` to `WindowOptions`, closes #2968 (#2989) --- .changes/api-WebviewWindow-fileDropEnabled.md | 5 +++++ tooling/api/src/window.ts | 6 ++++++ 2 files changed, 11 insertions(+) create mode 100644 .changes/api-WebviewWindow-fileDropEnabled.md diff --git a/.changes/api-WebviewWindow-fileDropEnabled.md b/.changes/api-WebviewWindow-fileDropEnabled.md new file mode 100644 index 000000000..06835a929 --- /dev/null +++ b/.changes/api-WebviewWindow-fileDropEnabled.md @@ -0,0 +1,5 @@ +--- +"api": patch +--- + +Add `fileDropEnabled` property to `WindowOptions` so you can now disable it when creating windows from js. diff --git a/tooling/api/src/window.ts b/tooling/api/src/window.ts index fc974a3c4..5ce0364ff 100644 --- a/tooling/api/src/window.ts +++ b/tooling/api/src/window.ts @@ -1185,6 +1185,12 @@ interface WindowOptions { alwaysOnTop?: boolean /** Whether or not the window icon should be added to the taskbar. */ skipTaskbar?: boolean + /** + * Whether the file drop is enabled or not on the webview. By default it is enabled. + * + * Disabling it is required to use drag and drop on the frontend on Windows. + */ + fileDropEnabled?: boolean } /**