Search Issue Tracker
By Design
Votes
1
Found in
2020.3.36f1
2021.3.5f1
2022.1.7f1
2022.2.0a17
2023.1.0a2
Issue ID
UUM-8041
Regression
No
EditorWindow.hasFocus always returns true
To reproduce:
1. Open the project “EditorWindowHasFocusBug”
2. Open the EditorWindowImpl window (Bug Report → Open Test Window)
3. Stop focusing EditorWindow (e.g., click somewhere on your desktop)
Expected result: All three methods return false
Actual result: Method “hasFocus” returns true
Reproducible with: 2020.3.36f1, 2021.3.5f1, 2022.1.7f1, 2022.2.0a17, 2023.1.0a2
Reproduced on: macOS Monterey 12.4 (Intel)
Note: The script is Assets → Scripts → Editor → EditorWindowImpl.cs
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note:
We agree that the name `hasFocus` is not the most intuitive, however it behaves as expected. `myWindow.hasFocus` means that this is the visible window within a docking area, even if it doesn't have event focus. To know what `EditorWindow` has the event focus, please use `EditorWindow.focusedWindow`.