Skip to content

Commit 2370776

Browse files
authored
Drag region attribute check (#1907)
1 parent 998cbed commit 2370776

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
3+
---
4+
5+
As some frameworks automatically add "true" as the value of the attribute, we need to check if it exists instead.

core/tauri/scripts/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ if (!String.prototype.startsWith) {
190190
// drag region
191191
document.addEventListener('mousedown', (e) => {
192192
// start dragging if the element has a `tauri-drag-region` data attribute
193-
if (e.target.dataset.tauriDragRegion === '' && e.buttons === 1) {
193+
if (e.target.hasAttribute('data-tauri-drag-region') && e.buttons === 1) {
194194
window.__TAURI__.invoke('tauri', {
195195
__tauriModule: "Window",
196196
message: {

0 commit comments

Comments
 (0)