RPTools/maptool

[Bug]: Right Mouse Button Click should not open Context Menu when Scrolling Map

Closed this issue · 1 comments

Describe the Bug

When trying to drag/scroll the map via the right mouse button, it is automatically opening up the Token context menu while dragging the map, making it likely than an inadvertent and unintended menu item may be clicked, and making it awkward for trying to just move the map.

This has been confirmed to only happen from 1.18 forward.

To Reproduce

  1. Go to any map containing tokens.
  2. Right-click on the token while attempting to scroll/drag the map.

Expected Behaviour

Right-click should behave as it did prior to 1.18, and not open unless no/minimal mouse movement is confirmed.

Screenshots

No response

MapTool Info

1.18.2 RC1

Desktop

Windows 11 latest official build

Additional Context

No response

Originally raised on discord, but collating notes here.

Confirmed that it does not do this in 1.17.1 and I thought that there are some changes in 1.18.x which now mean the popup menu is shown after dragging.

Specifically because some dragging variables (which are used later on to determine whether or not to show the popup menu) appear to now be reset prematurely via this changed line: release-1.17...1.18.2#diff-0b0ba88bab892fef23404a9743fcd36807668bc5eddf340d8c1627072331aa55R481. super.mouseReleased(e); was already being called at the end of mouseReleased() so may that change may be superfluous?