mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-23 11:36:13 +02:00
fix(window): use button property for data-tauri-drag-region left mouse button detection (#590)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user