Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] data-tauri-drag-region click event issue #9751

Closed
DWHengr opened this issue May 11, 2024 · 6 comments
Closed

[bug] data-tauri-drag-region click event issue #9751

DWHengr opened this issue May 11, 2024 · 6 comments
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@DWHengr
Copy link

DWHengr commented May 11, 2024

Describe the bug

After setting the "data-tauri-pull-region" attribute to a div, there is an issue with the onClick event triggering of the div, which requires double clicking to trigger. How to click to trigger this event.

Reproduction

No response

Expected behavior

No response

Full tauri info output

[✔] Environment
    - OS: Windows 10.0.22631 X64
    ✔ WebView2: 118.0.2088.76
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.73.0 (cc66ad468 2023-10-03)
    ✔ cargo: 1.73.0 (9c4383fb5 2023-08-26)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)

[-] Packages
    - tauri [RUST]: 1.6.2
    - tauri-build [RUST]: 1.5.1
    - wry [RUST]: 0.24.8
    - tao [RUST]: 0.16.9
    - @tauri-apps/api [NPM]: 1.5.4 (outdated, latest: 1.5.5)
    - @tauri-apps/cli [NPM]: 1.5.12 (outdated, latest: 1.5.13)

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/
    - framework: React
    - bundler: Vite

Stack trace

No response

Additional context

No response

@DWHengr DWHengr added status: needs triage This issue needs to triage, applied to new issues type: bug labels May 11, 2024
@amrbashir
Copy link
Member

please provide more information, what do you mean click to trigger this event? also the correct attribute is data-tauri-drag-region

@DWHengr
Copy link
Author

DWHengr commented May 14, 2024

I set "data-tauri-drag-region" on a div, and now I want to click on this div to trigger the onClick event, and I find that the click cannot be triggered. However, the double-click does trigger the onClick event.

@amrbashir
Copy link
Member

That's the expected behavior, when you add data-tauri-drag-region the first event is absorbed, otherwise we can't drag.

@amrbashir amrbashir closed this as not planned Won't fix, can't repro, duplicate, stale May 14, 2024
@DWHengr
Copy link
Author

DWHengr commented May 14, 2024

So how can I get this first event, something like a "tauri://window-drag" event?

@DWHengr
Copy link
Author

DWHengr commented May 14, 2024

@amrbashir

@amrbashir
Copy link
Member

So how can I get this first event, something like a "tauri://window-drag" event?

There is no event like that, and I don't know what you're trying to achieve tbh so I can't provide helpful suggestions but you could try listening to mousedown event

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants