diff --git a/.changes/fix-2549.md b/.changes/fix-2549.md new file mode 100644 index 000000000000..35b782a94ba3 --- /dev/null +++ b/.changes/fix-2549.md @@ -0,0 +1,5 @@ +--- +"tauri": "patch" +--- + +Fix resize glitch when double clicking a custom titlebar in the top resize area. 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',