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
- TextMeshPro text input's caret is flickering when Line Mode is set to Multi Line and text is selected
- Can’t delete gradient keys with Mac keyboard or context menu options
- Editor freezes for a few minutes when closing or switching a VFX window that was opened in a previous project
- UI Overlaps when switching Render Pipeline Asset for different Quality Levels in Quality Project Settings
- Ray Tracing Shader link to the documentation isn’t working
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`.