Repository: klembot/twinejs

Issue #1206: 2.4.1 Middle mouse button both creates passage and enters autoscroll
Created: 2022-07-18T04:23:51Z
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.)
 I have done a search and believe that an issue does not already exist for this bug in the GitHub repository.
 I have read and agree to abide by this project's Code of Conduct.

Duplicate issue #1244: Middle-click to create new passages collides with the browser built-in scroll feature in Firefox and Chrome/Electron
Created: 2022-08-15T13:16:27Z
Splitoff from #1241. Using 2.4 open in Electron and in Firefox, middle-clicking both creates a new passage and activates the browser built-in scroll feature. For those unfamiliar, this places an anchor-point on the page, then lets you scroll the page by drifting the cursor away from the anchor point, similar to a virtual joystick. Middle-clicking again dismisses the anchor-point.
This built-in input actually worked quite well for scrolling the passage map in 2.3 (to the point that I never used the dragging feature you included) but now collides with this input in 2.4.
Expected behavior:
Either one or the other should happen - if a new passage is created, then the click should not be allowed to bubble up to the browser.
Personally speaking, I actually think "new passage" should be bound to right-click instead of middle-click, because in Twine 1.4 you'd right-click to get the "New Passage Here" menu. Also, since the browsers have already established middle-click to mean "scroll", we seem to be working against a well-established UI precedent here, which doesn't sound good in the least.
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?
Firefox
Presubmission checklist

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

Closing comment (2022-08-15T21:40:30Z): Dupe of #1206, but I had time to look at it today and I'll add an additional comment there shortly.