mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-26 21:41:48 +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
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
document.addEventListener("mousedown", (e) => {
|
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
|
// prevents text cursor
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
// fix #2549: double click on drag region edge causes content to maximize without window sizing change
|
// fix #2549: double click on drag region edge causes content to maximize without window sizing change
|
||||||
|
|||||||
Reference in New Issue
Block a user