mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-12-03 02:09:50 +03:00
This commit is contained in:
parent
df8bdcf063
commit
4f1e87f87b
5
.changes/drag-region-refactor.md
Normal file
5
.changes/drag-region-refactor.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Change draggable region element detection from `drag-region` class to `data-tauri-drag-region` attribute.
|
@ -189,7 +189,8 @@ if (!String.prototype.startsWith) {
|
||||
|
||||
// drag region
|
||||
document.addEventListener('mousedown', (e) => {
|
||||
if (e.target.classList.contains('drag-region') && e.buttons === 1) {
|
||||
// start dragging if the element has a `tauri-drag-region` data attribute
|
||||
if (e.target.dataset.tauriDragRegion === '' && e.buttons === 1) {
|
||||
window.__TAURI__.invoke('tauri', {
|
||||
__tauriModule: "Window",
|
||||
message: {
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -80,7 +80,7 @@
|
||||
</script>
|
||||
|
||||
<main>
|
||||
<div class="flex row noselect just-around" style="margin=1em;">
|
||||
<div class="flex row noselect just-around" style="margin=1em;" data-tauri-drag-region>
|
||||
<img src="tauri.png" height="60" on:click={onLogoClick} alt="logo" />
|
||||
<div>
|
||||
<a class="dark-link" target="_blank" href="https://tauri.studio/en/docs/getting-started/intro">
|
||||
|
Loading…
Reference in New Issue
Block a user