Skip to content

Commit 70e535a

Browse files
authored
fix(window): use button property for data-tauri-drag-region left mouse button detection (#590)
1 parent 2cb0fa7 commit 70e535a

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"window": "patch"
3+
---
4+
5+
On macOS, fixed tapping on custom title bar doesn't maximize the window.

plugins/window/src/scripts/drag.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// SPDX-License-Identifier: MIT
44

55
document.addEventListener("mousedown", (e) => {
6-
if (e.target.hasAttribute("data-tauri-drag-region") && e.buttons === 1) {
6+
if (e.target.hasAttribute("data-tauri-drag-region") && e.button === 0) {
77
// prevents text cursor
88
e.preventDefault();
99
// fix #2549: double click on drag region edge causes content to maximize without window sizing change

0 commit comments

Comments
 (0)