Search Issue Tracker
By Design
By Design in 2023.1.X
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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`.
Resolution Note (2023.1.X):
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`.