diff --git a/NEG/UI/UnityUi/MonoUiManager.cs b/NEG/UI/UnityUi/MonoUiManager.cs index 7db2fb4..dbafda8 100644 --- a/NEG/UI/UnityUi/MonoUiManager.cs +++ b/NEG/UI/UnityUi/MonoUiManager.cs @@ -75,8 +75,11 @@ namespace NEG.UI.UnityUi base.UpdatePopupsState(forceShow, priority, data); if(inputModule.CurrentSelectionSource != SelectionSource.Direction) return; - if (CurrentPopup == null && (EventSystem.current.currentSelectedGameObject != null || !EventSystem.current.currentSelectedGameObject.activeInHierarchy)) + + if (CurrentPopup == null && (EventSystem.current.currentSelectedGameObject == null || !EventSystem.current.currentSelectedGameObject.activeInHierarchy)) { + if(((MonoWindow)CurrentMainWindow).DefaultSelectedItem == null) + return; EventSystem.current.SetSelectedGameObject(((MonoWindow)CurrentMainWindow).DefaultSelectedItem); } }