Search Issue Tracker
Fixed in 2022.2.X
Fixed in 2020.3.X, 2021.3.X, 2022.1.X
Input system sometimes does not fire canceled event on left-click action
1. Open the attached "1405273.zip" project
2. Open the "SampleScene" scene
3. Enter Play mode
4. Press the left mouse button in the Game view
5. Release it, then quickly press and release it again (might need to repeat the 4th and 5th steps many times to reproduce)
6. Observe the "Cube" GameObject in the Game view
Expected result: The GameObject always returns to red when the left mouse button is released
Actual result: Occasionally the GameObject fails to return to red when the left mouse button is released
Reproducible with: 2020.3.31f1, 2021.2.0a16, 2021.2.14f1, 2022.1.0b10, 2022.2.0a6
Not reproducible with: 2019.4.36f1, 2020.3.30f1
- Could not reproduce in builds
- The 4th and 5th steps were done up to 100 times when testing each version
- Tested on Windows
This is a Windows Runtime bug and isn't specific to Input System package; it just happens to be readily exposed by new input.
It's very difficult to consistently repro the issue, but I've found a technique that seems to work reasonably well: execute a "staggered" double-click.
That is, perform a "normal" click followed immediately by a fast second click. The bug appears to trigger when the second mouse click occurs very quickly after the mouse up from the first click, but note that spamming mouse clicks doesn't seem to work very well.
Even then, it may still take multiple attempts to repro the bug.
Mar 03, 2022 09:26
Have a similar issue. Investigation of the problem showed that because of the quick mouse click, sometimes mouse button stay in pressed state. I.e. code Mouse.current.leftButton.isPressed returns 'true'. The InputDebugger also shows that the button is pressed at that moments(leftButton control value is 1). The problem can be reproduced for both left and right buttons.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Can't import asset via Package Manager when it consists of sub-packages and one of them is already imported
- CubemapArrays and Cubemaps take up significantly more memory than on other platforms when working with a Windows project
- The Weight Field in the LimbSolver2D Component for 2D IK Can’t Be Animated or Smoothly Transitioned
- Selected “Landscape Left” orientation of the “ScreenOrientation” dropdown in the Inspector window gets deselected when deselecting and selecting GameObject that contains a “ScreenOrientation” dropdown
- Shader Graph and the Visual Effects Graph scroll unreasonably fast on OSX
Resolution Note (fix version 2022.2):
This bug was root-caused to wonky behavior with the Windows DragDetect() API, were it sometimes "eats" the WM_LBUTTONUP message causing the mouse button state (within the GameView) to get "stuck". This API call was added awhile back to fix overly sensitive drag-drop interactions with some Editor UI controls.
It's unclear if this API behavior is due to a bug in Windows or some undocumented side effect, but a lesson for any Windows devs who stumble onto this page from your Googling: beware DragDetect(); there be dragons here.
Fixed in 2022.2.0a12
Resolution Note (fix version 2022.1):
Fixed in 2022.1.1f1
Resolution Note (fix version 2021.3):
Fixed in 2021.3.3f1
Resolution Note (fix version 2020.3):
Fixed in 2020.3.35f1