fix(window): use `button` property for `data-tauri-drag-region` left mouse button detection (#590)

pull/593/head
Jason Tsai 2 years ago committed by GitHub
parent 2cb0fa719b
commit 70e535abd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,5 @@
---
"window": "patch"
---
On macOS, fixed tapping on custom title bar doesn't maximize the window.

@ -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

Loading…
Cancel
Save