Procházet zdrojové kódy

chore: add comment explaining preventDefault() usage

Lucas Nogueira před 3 roky
rodič
revize
0c45641398
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  1. 1 0
      core/tauri/scripts/core.js

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

@@ -134,6 +134,7 @@
   // drag region
   document.addEventListener('mousedown', (e) => {
     if (e.target.hasAttribute('data-tauri-drag-region') && e.buttons === 1) {
+      // prevents text cursor
       e.preventDefault()
       // start dragging if the element has a `tauri-drag-region` data attribute and maximize on double-clicking it
       window.__TAURI_INVOKE__('tauri', {