klembot / twinejs

Twine, a tool for telling interactive, nonlinear stories
https://twinery.org
GNU General Public License v3.0
2k stars 296 forks source link

2.4.X Strange mouse behavior after rapid click and drag #1205

Open AlyxMS opened 2 years ago

AlyxMS commented 2 years ago

Describe the bug.

After rapidly clicking and dragging in Twine(Tested on 2.4.0 and 2.4.1, Windows 10, 2 separate PC), the mouse would become "stuck"(The blue selection area does not disappear even when left mouse button is not pressed) and all passages will be attached to the mouse if left mouse button is held down. It is hard to describe, please reference the video in "Steps to reproduce". Selecting and unselecting a passage seem to fix it temporarily.

Steps to reproduce:

Rapidly clicking and dragging in an empty area in story edit. See video. Only the mouse is used to reproduce this bug, there is no keyboard input.

https://user-images.githubusercontent.com/7328128/179443099-f201f0f8-cbe2-44ef-805c-5d36f8d230a8.mp4

Expected behavior:

Rapidly clicking and dragging in an empty area should do nothing.

Additional context on this problem.

No response

Twine version number

2.4.1

Does this problem occur with the web version of Twine or the desktop app?

Desktop app

What operating system does this problem occur on?

Windows

If this problem is occurring with the web version of Twine, what browser does it occur on?

No response

Presubmission checklist

klembot commented 2 years ago

I can't reproduce this myself... but I don't think you're faking the video :). It may be something related to Windows? or your particular setup? If others reading this can cause this to happen, please chime in here with any other details you can provide.

AlyxMS commented 2 years ago

I can't reproduce this myself... but I don't think you're faking the video :). It may be something related to Windows? or your particular setup? If others reading this can cause this to happen, please chime in here with any other details you can provide.

I just tested it some more. Seems like it is much more likely to happen when dragging form right side to left and the rapid click part is not required. Some times the very first click could've been stuck. I had the same issue on 2 computers so I don't think it's related to my setup. Might be related to windows and not reproducable on other operating systems.

Here's another video:

https://user-images.githubusercontent.com/7328128/181994798-7ad65430-7047-4db4-b74d-f1e6e68f884d.mp4

Edit: The "a copy of the passage names gets stuck to the mouse when LMB is pressed" behavior is still there. It just didn't show up in the video. On the old video I was using the record screen function to capture the video, on this one I used capture window. Maybe that's why the passage names aren't captured.

AlyxMS commented 2 years ago

Alright so I just tested this again. Looks like the drag direction is a red herring.

The REAL trigger to this bug seems to be the proximity of the mouse cursor when starting the drag. Clicking and dragging in an empty area away from any passages does nothing 99% of the time.

However starting it right next to a passage box have a very high chance of reproducing this bug. Still can't nail it down to something with 100% reproducability