-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Dragging mouse to select text in script editor may randomly change selection range and trigger drag #93078
Comments
Bisected #92424 as the first bad commit. |
I can't reproduce (Godot v4.3.beta (475248d) - Windows 10.0.22631 - Vulkan (Forward+)). |
Thanks for bisecting. I suspect it is because the patch uses
When the application processes the first message, it is possible that the user has already pressed the mouse button so I think it really should use
In my capture, when the selection stops changing I definitely released the left mouse button. If my hypothesis above is correct, then the key point is that the mouse must be moving when pressing the mouse button to reproduce the bug. If you really need to verify, I can make a capture with an OSD showing the mouse buttons (though I don't currently have a tool for this so I'll need to hunt for one). |
Can confirm in v4.3.beta.custom_build [475248d] |
I misunderstood earlier, I can reproduce it now while moving the mouse. Adding logpoints show that a mouse motion event with the left mouse button down is being sent before the mouse pressed event. Created a PR #93105 that uses GetKeyState as suggested. |
Tested versions
System information
Windows 10 - Godot v4.3.beta (5241d30)
Issue description
When dragging the mouse cursor in the script editor from outside selected text (or when there isn't a text selection), sometimes (seemingly randomly) the selection range will suddenly extend to the mouse down location and initiates an unwanted drag operation. This happens without touching any keyboard keys.
capture.webm
Steps to reproduce
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: