Search Issue Tracker
By Design
Votes
0
Found in
2023.2.19f1
6000.0.0b15
Issue ID
UUM-69920
Regression
Yes
TextField cannot be edited in an extended Editor window when double-clicking it
How to reproduce:
1. Open the “UIR2022.3.24“ project
2. Open the “UIRTest” window (Window > UI Toolkit > UIRTest)
3. Double-click on the “EDIT ME PLEASE” text
Expected result: A text box is displayed
Actual result: Nothing happens
Reproduced with: 2023.2.0a6, 2023.2.19f1, 6000.0.0b15
Not reproduced with: 2021.3.37f1, 2022.3.25f1, 2023.2.0a5
Reproduced on: macOS 14.4.1 (M1) (by reporter), Windows 11
Not reproduced on: No other environment tested
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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
Resolution Note:
Starting in 2023.2 and going forward, Pointer events and their corresponding Mouse events are propagated at the same time. This simplifies the workflow and helps migrating from mouse to pointer events, which are more flexible and the recommended way to handle all pointer types.
A consequence of this simplification is that the MouseDownEvent is now received by its target *before* the focus is modified. When the MouseDownEvent callback calls Focus() on an element, that focus is very quickly replaced by the target of the MouseDownEvent. This behavior is exactly matching the behavior of the PointerDownEvent in 2022.3 and earlier, which is what Unity is aiming for.
This problem can be fixed by adding
{code:c#}rootVisualElement.focusController.IgnoreEvent(e);{code} to the MouseDownEvent callback method after e.StopPropagation():
{code:c#}
private void OnMouseDownEvent(PointerDownEvent e) {
if (e.clickCount != 2)
return;
FocusTitleEditor();
e.StopPropagation();
rootVisualElement.focusController.IgnoreEvent(e);
}
{code}