Skip to content

Commit 0797a00

Browse files
authored
fix: use button property for data-tauri-drag-region mouse button detection, closes #7694 (#7746)
1 parent 53ab204 commit 0797a00

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+
'tauri': 'patch:bug'
3+
---
4+
5+
On macOS, fixed tapping on custom title bar doesn't maximize the window.

core/tauri/scripts/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134

135135
// drag region
136136
document.addEventListener('mousedown', (e) => {
137-
if (e.target.hasAttribute('data-tauri-drag-region') && e.buttons === 1) {
137+
if (e.target.hasAttribute('data-tauri-drag-region') && e.button === 0) {
138138
// prevents text cursor
139139
e.preventDefault()
140140
// fix #2549: double click on drag region edge causes content to maximize without window sizing change

0 commit comments

Comments
 (0)