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

This commit is contained in:
Jason Tsai authored and GitHub committed 2023-09-04 20:09:23 +03:00
1 parent 2cb0fa719b
commit 70e535abd5
2 files changed
+6 -1

No files matched your search

+1 -1
View File
@@ -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