From 6a45d5d214a1a4b90e1acc6c332da066f19d6de9 Mon Sep 17 00:00:00 2001 From: CGQAQ Date: Tue, 3 Jan 2023 15:14:29 +0800 Subject: [PATCH 1/3] fix: Resizing glitch on custom titlebar click (#2549) --- core/tauri/scripts/core.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/tauri/scripts/core.js b/core/tauri/scripts/core.js index 1538b312a2d1..634d1f6e9e90 100644 --- a/core/tauri/scripts/core.js +++ b/core/tauri/scripts/core.js @@ -136,6 +136,10 @@ if (e.target.hasAttribute('data-tauri-drag-region') && e.buttons === 1) { // prevents text cursor e.preventDefault() + // fix #2549: double click on drag region edge causes content to maximize without window sizing change + // https://github.com/tauri-apps/tauri/issues/2549#issuecomment-1250036908 + e.stopImmediatePropagation() + // start dragging if the element has a `tauri-drag-region` data attribute and maximize on double-clicking it window.__TAURI_INVOKE__('tauri', { __tauriModule: 'Window', From 6aa20996ccb0c242e4b93df8e17752b3aaefa612 Mon Sep 17 00:00:00 2001 From: CGQAQ Date: Tue, 3 Jan 2023 15:19:20 +0800 Subject: [PATCH 2/3] chores: add changes --- .changes/fix-2549.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changes/fix-2549.md diff --git a/.changes/fix-2549.md b/.changes/fix-2549.md new file mode 100644 index 000000000000..7b42bf3c3e91 --- /dev/null +++ b/.changes/fix-2549.md @@ -0,0 +1,5 @@ +--- +"tauri": "patch" +--- + +fix: Resizing glitch on custom titlebar click (closes #2549) From a1a3f144df3fc08fc572dbe1c8e2ec52d61af4b3 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Tue, 3 Jan 2023 09:56:22 -0300 Subject: [PATCH 3/3] Update .changes/fix-2549.md [skip ci] Co-authored-by: Amr Bashir --- .changes/fix-2549.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changes/fix-2549.md b/.changes/fix-2549.md index 7b42bf3c3e91..35b782a94ba3 100644 --- a/.changes/fix-2549.md +++ b/.changes/fix-2549.md @@ -2,4 +2,4 @@ "tauri": "patch" --- -fix: Resizing glitch on custom titlebar click (closes #2549) +Fix resize glitch when double clicking a custom titlebar in the top resize area.