Search Issue Tracker

Fixed in 2022.2.X

Fixed in 2021.3.X, 2022.1.X

Votes

8

Found in

2020.3

2020.3.8f1

2021.1

Issue ID

1337545

Regression

No

UI Toolkit mouse click and down events are called twice on a single click on Linux

Linux

-

How to reproduce:
1. Open the user attached project (BugReport.zip)
2. Open the SampleScene
3. Enter PlayMode
4. Press once on the red and green rectangles
5. In the Console observe the number of times the "Click!" and "MouseDownEvent!" messages were printed

Expected result: the mouse event messages were printed once for each click
Actual result: the mouse event messages were printed twice for each click

Reproducible with: 2020.3.13f1, 2021.1.13f1
Could not test with: 2019.4.28f1 (UI Toolkit incompatible with given Editor version), 2021.2.0b1 (having UI Toolkit installed throws missing namespace errors)

Notes:
1. Reproducible on Ubuntu 18.04
2. Not reproducible on Windows 7
3. UI Toolkit version used 1.0.0-preview.14. Older package versions could not be tested due to compiler errors

  1. Response avatar

    Resolution Note (fix version 2022.2):

    Fixed in 2022.2.0a11

  2. Response avatar

    Resolution Note (fix version 2022.1):

    Fixed in 2022.1.1f1

  3. Response avatar

    Resolution Note (fix version 2021.3):

    Fixed in 2021.3.3f1

Comments (3)

  1. 24edc06b5f322624a7631d42174040cc?d=mm

    niel-archer

    Oct 01, 2021 23:35

    Still seeing this on Manjaro with 2021.2.0b14

  2. E586c89465594a28dbf91e629b4c37b4?d=mm

    morabitom

    Oct 01, 2021 14:37

    Running into this with 5.10.68-1-MANJARO and KDE Plasma 5.22.5. Tried with both mouse and touchpad.

    Not reproducible on Windows 10

  3. F15504ee83cb1e2b20f881e9b9f599f9?d=mm

    whitelion123

    Oct 01, 2021 09:03

    This simple code pop two events. The pointerType is correct the first time and a bit strange the second. The x coordinates is not the same.

    Event e = new Event();
    public void Update()
    {
    while(Event.PopEvent(e))
    {
    if (e.rawType == EventType.MouseUp)
    {
    Debug.Log(e);
    Debug.Log(e.clickCount);
    Debug.Log(e.pointerType);
    }
    }
    }

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.