twinejs icon indicating copy to clipboard operation
twinejs copied to clipboard

2.4.1 Middle mouse button both creates passage and enters autoscroll

Open AlyxMS opened this issue 2 years ago • 4 comments

Describe the bug.

In 2.4.0, pressing middle mouse button(mouse wheel) creates a new passage at mouse point.

In 2.4.1, other than creating a new passage, this also enters auto scrolling mode(similar to pressing middle mouse button on a webpage). This serves no practical purpose(The user is unlikely to want to auto scroll immediately after creating a passage. Rather the typical action after creating a passage is probably moving the new passage to the desired place or start editing the passage.)

Tested in Windows 10 desktop app and web app(Windows 10, Chrome).

Steps to reproduce:

Launch Twine, enter a story to edit. Middle mouse click on an empty area. A new passage would be created and Twine would be in auto scroll. Moving the mouse would start to scroll around the story area.

Expected behavior:

Middle mouse click either creates a new passage, or enters auto scroll, not both.

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

  • [ ] I am interested in working on code that would fix this bug. (This is not required to submit a bug report.)
  • [X] I have done a search and believe that an issue does not already exist for this bug in the GitHub repository.
  • [X] I have read and agree to abide by this project's Code of Conduct.

AlyxMS avatar Jul 18 '22 04:07 AlyxMS

Using a single Scroll-Wheel / Middle-Button click to enter mouse-movement based "autoscroll" / "smooth scrolling" mode is not an uncommon action when using a web-browser, or even some other applications. And there are web-browser addons/extensions an end-user may install when the web-browser itself doesn't support this behaviour.

I think this fact should be consider before possibly disabling/replacing this feature in the web-browser release of the Twine 2.x application.

greyelf avatar Jul 18 '22 21:07 greyelf

Middle-click to create was functionality in 2.3.... whether it was a good idea in the first place is another story. I don't feel strongly one way or the other, but I err for now on the side of keeping shortcuts that were present in 2.3.

klembot avatar Jul 20 '22 02:07 klembot

I've had the same behaviour with the right button, where clicking and dragging with the right-button can lock the mouse in "drag mode" and make it impossible to release.

hituro avatar Jul 25 '22 18:07 hituro

I've had the same behaviour with the right button, where clicking and dragging with the right-button can lock the mouse in "drag mode" and make it impossible to release.

This is a different bug... could you open a new issue for that? I'm sad that this is apparently still an issue because 2.4 uses pointer capture to try to avoid this very scenario.

klembot avatar Jul 25 '22 21:07 klembot

I misspoke earlier in this issue... my memory was bad. Middle-click to create passages was not in 2.3. What was there was you could force-click to create passages (which is supported in Safari only according to MDN).

This was all prompted by me misremembering how the feature worked as I was reimplementing things during the React/TypeScript migration, so I think the best course of action is to remove the feature. I don't think reimplementing the force-click behavior is worth it because Safari isn't a recommended browser in most cases because of the local storage issues.

Apologies for the confusion, everyone. I genuinely thought I was putting in functionality people would expect to carry over, but now I get why this has been a pain point.

klembot avatar Aug 15 '22 21:08 klembot