tauri-docs icon indicating copy to clipboard operation
tauri-docs copied to clipboard

docs(window): add userland example for detecting drag-stopped and res…

Open Khyati-Kapil opened this issue 2 months ago • 3 comments

docs(window): add userland example for detecting drag-stopped and resize-stopped events

This PR adds a userland JavaScript example demonstrating how developers can detect when a window drag or resize operation has stopped by listening to the continuously emitted tauri://move and tauri://resize events and debouncing them.

Since native drag-end / resize-end events are not currently exposed by Tauri and JS event detection is not reliable enough to be implemented in the runtime, this example provides a recommended, practical solution for developers needing this behavior.

The new section is added to learn/window-customization.mdx where other window interaction examples (dragging, maximizing, custom titlebars) are already documented.

Khyati-Kapil avatar Dec 04 '25 19:12 Khyati-Kapil

Deploy Preview for tauri-v2 ready!

Built without sensitive environment variables

Name Link
Latest commit 2a1d54cde053322282391b71869c145ab25fbe4b
Latest deploy log https://app.netlify.com/projects/tauri-v2/deploys/6931dd483d6d73000816e477
Deploy Preview https://deploy-preview-3631--tauri-v2.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

Lighthouse
1 paths audited
Performance: 99 (🔴 down 1 from production)
Accessibility: 98 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

netlify[bot] avatar Dec 04 '25 19:12 netlify[bot]

Hey, thanks for working on this, but I'm not sure how useful is it to leave a very much incomplete solution like this, and by

I think this should be done on user land

I meant if a user wants to do it, they can, I don't mean we should document this in our guides, since those guides are meant to be the approaches we recommend

Sorry for being harsh on this, hope you understand 🙏

Legend-Master avatar Dec 05 '25 04:12 Legend-Master

Thank you for the clarification — that makes sense.

I misunderstood the original intention behind “should be done in userland”. Totally understand your point about the guides reflecting recommended approaches only. No worries at all — thanks for explaining it clearly.

If a more complete or reliable approach becomes possible in the future, I’d be happy to revisit the idea in a way that aligns with Tauri’s recommendations.

Khyati-Kapil avatar Dec 05 '25 13:12 Khyati-Kapil

I'll close this for now, feel free to re-open if you came up with something more complete in the future, thanks anyways!

Legend-Master avatar Dec 20 '25 08:12 Legend-Master