Explorar el Código

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

FabianLars hace 4 años
padre
commit
578610a29d
Se han modificado 2 ficheros con 11 adiciones y 1 borrados
  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_