mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-01 03:02:28 +03:00
Drag region attribute check (#1907)
This commit is contained in:
parent
998cbed565
commit
23707764dc
5
.changes/fix-attribute-drag-region.md
Normal file
5
.changes/fix-attribute-drag-region.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
As some frameworks automatically add "true" as the value of the attribute, we need to check if it exists instead.
|
@ -190,7 +190,7 @@ if (!String.prototype.startsWith) {
|
||||
// drag region
|
||||
document.addEventListener('mousedown', (e) => {
|
||||
// start dragging if the element has a `tauri-drag-region` data attribute
|
||||
if (e.target.dataset.tauriDragRegion === '' && e.buttons === 1) {
|
||||
if (e.target.hasAttribute('data-tauri-drag-region') && e.buttons === 1) {
|
||||
window.__TAURI__.invoke('tauri', {
|
||||
__tauriModule: "Window",
|
||||
message: {
|
||||
|
Loading…
Reference in New Issue
Block a user