diff --git a/.changes/window-tap-drag-region-detection.md b/.changes/window-tap-drag-region-detection.md new file mode 100644 index 00000000..66fcbaf7 --- /dev/null +++ b/.changes/window-tap-drag-region-detection.md @@ -0,0 +1,5 @@ +--- +"window": "patch" +--- + +On macOS, fixed tapping on custom title bar doesn't maximize the window. diff --git a/plugins/window/src/scripts/drag.js b/plugins/window/src/scripts/drag.js index 3b227bc6..2bcc3ee6 100644 --- a/plugins/window/src/scripts/drag.js +++ b/plugins/window/src/scripts/drag.js @@ -3,7 +3,7 @@ // SPDX-License-Identifier: MIT document.addEventListener("mousedown", (e) => { - if (e.target.hasAttribute("data-tauri-drag-region") && e.buttons === 1) { + if (e.target.hasAttribute("data-tauri-drag-region") && e.button === 0) { // prevents text cursor e.preventDefault(); // fix #2549: double click on drag region edge causes content to maximize without window sizing change