Search Issue Tracker
By Design
Votes
0
Found in [Package]
1.1.0-preview.14
Issue ID
1345865
Regression
No
Disabling the 'Deselect On Background Clicks' option in Input Module component doesn't work when using UIToolkit
How to reproduce:
1. Open the attached project's Scene labeled "Main Menu"
2. Enter the Play Mode
3. In the Game View, move the Gamepad's Left Joystick (to select visual elements)
4. Using the mouse, click on the background
5. Inspect the Console Window
Expected result: Currently selected visual element is not null
Actual result: Currently selected visual element is null
Reproducible with: 2021.2.0b4, 2022.1.0a2
Couldn't test with: 2019.4.29f1 (UI Toolkit is not available), 2020.3.14f1, 2021.1.16f1 (Project breaks when downgrading)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [AppleTV] Add to Embedded Binaries option is missing in the Plugin Importer
- VFX Graph samples' flipbook properties are not properly assigned when importing samples from the Package Manager
- [Android]Audio playback is silent when played on the Google Pixel 5 device
- The font and border color indicating the selected Rendering Layer is displayed incorrectly when more than two new Layers are added
- Particles are not visible due to depth value range calculation differences in OpenGL Graphics API when using Camera Fade
Resolution Note:
The UIDocument in the repro project has a white background ("#wrap") that covers the entire GameView window and that has PickingMode=Position. This means that clicking on it will deselect any other selected element, as per the design of UI Toolkit, and as would happen in a regular, non-runtime EditorWindow. I've just verified that setting PickingMode=Ignore on the background element does indeed stop the deselection from happening.
I have also tested the DeselectOnBackgroundClick option in an empty scene with just 1 UIDocument with 1 TextField, and a GameObject with the EventSystem + InputSystemUIInputModule components. Clicking in the background does deselect the TextField, if and only if the DeselectOnBackgroundClick option is enabled.
This feature seems to be working as intended.