Skip to content

[windows] Allow single-clicks on wails-draggable items #2482

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

Merged
merged 3 commits into from
Mar 20, 2023

Conversation

stffabi
Copy link
Collaborator

@stffabi stffabi commented Mar 12, 2023

This basically reverts parts of #2302 by using the "defer to mouse move" mode but to an enhanced version that should does not lag/delay the dragging on Windows.

Fixes #2471

@vercel
Copy link

vercel bot commented Mar 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
wails-v3-docs ❌ Failed (Inspect) Mar 20, 2023 at 7:32AM (UTC)

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 12, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1ab07b4
Status: ✅  Deploy successful!
Preview URL: https://e79b5ad3.wails.pages.dev
Branch Preview URL: https://feature-deferdrag-windows-ol.wails.pages.dev

View logs

@mholt
Copy link
Contributor

mholt commented Mar 12, 2023

This is great!!

I can confirm that this works on Windows and does not break the behavior on Linux. 🎉 🥳

Edit: But removing the line of code setting it to true does cause Windows to require a double-click now :(

Copy link
Member

@leaanthony leaanthony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing mate!

@stffabi stffabi changed the title [runtime] Make it possible to restore old drag behaviour on windows with window.wails.flags.deferDragToMouseMove [windows] Allow single-clicks on wails-draggable items Mar 13, 2023
stffabi added 3 commits March 20, 2023 07:33
This enhanced version should work well in all cases for Windows:
- No lag/delayed start of dragging
- Double-Clicks and Single-Click events still work in JavaScript on elements
@stffabi stffabi force-pushed the feature/deferdrag-windows-old-behaviour branch from 239a2e8 to 1ab07b4 Compare March 20, 2023 07:32
@stffabi stffabi marked this pull request as ready for review March 20, 2023 07:37
@stffabi stffabi merged commit 47af68a into master Mar 20, 2023
@stffabi stffabi deleted the feature/deferdrag-windows-old-behaviour branch March 20, 2023 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After upgrading to version 2.4.0 and using wails dev
3 participants