fix: adjust feature flags, wrong zip usage (#367)

This commit is contained in:
Lucas Fernandes Nogueira
2023-05-17 18:47:12 -03:00
committed by GitHub
parent 7ae7167fbe
commit caf8456864
14 changed files with 167 additions and 154 deletions
+7 -7
View File
@@ -2,16 +2,16 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT
document.addEventListener('mousedown', (e) => {
if (e.target.hasAttribute('data-tauri-drag-region') && e.buttons === 1) {
document.addEventListener("mousedown", (e) => {
if (e.target.hasAttribute("data-tauri-drag-region") && e.buttons === 1) {
// prevents text cursor
e.preventDefault()
e.preventDefault();
// fix #2549: double click on drag region edge causes content to maximize without window sizing change
// https://github.com/tauri-apps/tauri/issues/2549#issuecomment-1250036908
e.stopImmediatePropagation()
e.stopImmediatePropagation();
// start dragging if the element has a `tauri-drag-region` data attribute and maximize on double-clicking it
const cmd = e.detail === 2 ? 'internal_toggle_maximize' : 'start_dragging'
window.__TAURI_INVOKE__('plugin:window|' + cmd)
const cmd = e.detail === 2 ? "internal_toggle_maximize" : "start_dragging";
window.__TAURI_INVOKE__("plugin:window|" + cmd);
}
})
});