Преглед изворни кода

fix(core): fix drag-region not sending its events correctly (#2196)

FabianLars пре 4 година
родитељ
комит
578610a29d
2 измењених фајлова са 11 додато и 1 уклоњено
  1. 5 0
      .changes/fix-data-tauri-drag-region.md
  2. 6 1
      core/tauri/scripts/core.js

+ 5 - 0
.changes/fix-data-tauri-drag-region.md

@@ -0,0 +1,5 @@
+---
+"tauri": patch
+---
+
+Fixes `data-tauri-drag-region` not firing its events.

+ 6 - 1
core/tauri/scripts/core.js

@@ -202,7 +202,12 @@ if (!String.prototype.startsWith) {
         {
           __tauriModule: 'Window',
           message: {
-            cmd: e.detail === 2 ? 'toggleMaximize' : 'startDragging'
+            cmd: 'manage',
+            data: {
+              cmd: {
+                type: e.detail === 2 ? 'toggleMaximize' : 'startDragging'
+              }
+            }
           }
         },
         _KEY_VALUE_