Skip to content

Commit

Permalink
fix: use button property for data-tauri-drag-region mouse button …
Browse files Browse the repository at this point in the history
…detection, closes #7694 (#7746)
  • Loading branch information
pewsheen committed Sep 7, 2023
1 parent 53ab204 commit 0797a00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/tauri-tap-drag-region-detection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tauri': 'patch:bug'
---

On macOS, fixed tapping on custom title bar doesn't maximize the window.
2 changes: 1 addition & 1 deletion core/tauri/scripts/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@

// drag region
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
Expand Down

0 comments on commit 0797a00

Please sign in to comment.