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

Right Mouse Button does not Behave as Expected During Drag-and-Drop Operations (Windows) #80378

Closed
jtwine opened this issue Aug 7, 2023 · 0 comments · Fixed by #86978
Closed

Comments

@jtwine
Copy link

jtwine commented Aug 7, 2023

Godot version

v4.1.1.stable.official [bd6af8e]

System information

Godot v4.1.1.stable - Windows 10.0.22621 - Vulkan (Compatibility) - NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.14.7311) - Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 Threads)

Issue description

During a Drag-and-Drop (D&D) operation in the editor, pressing the Right Mouse Button (RMB) does not work as expected.
The context menu appears but does not enter a standard menu modal message loop so releasing the Left Mouse Button commits the D&D operation, but right clicking to activate a menu item causes the menu to reappear and breaks the connection between the mouse movement indicating the drop location in the editor as the caret location will update, but the drop location will be the caret's location when the context menu first appeared.

Pressing the RMB during a D&D operation should either cancel the D&D operation, or it should be ignored allowing the user to complete the D&D operation normally. The latter is the standard behavior of most text editors in Windows, but for other D&D operations, using the other mouse button will cancel the D&D operation. You can verify this in apps like Windows Explorer and Outlook for example.

Steps to reproduce

Perform a valid D&D onto the editor but do not drop the item. Press down the RMB button and hold it. The context menu will appear and the caret in the editor will indicate a drop location. While still holding down the Left Mouse Button (to continue the D&D operation), try to select a menu item with the RMB. The context menu will just reappear at the new mouse location and the caret in the editor will move to match.

If you try to commit the D&D operation after doing this, the text will get inserted at the earlier location when you first raised the context menu, not at the current location of the caret which is unexpected.

Minimal reproduction project

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants