Skip to content

Commit eaccc6b

Browse files
committed
fix: check if popup stack is empty before giving back focus
1 parent 618a061 commit eaccc6b

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Explorer/Assets/DCL/Infrastructure/MVC/WindowsStackManager/WindowStackManager.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,13 @@ public PopupPopInfo PopPopup(IController controller)
7373
{
7474
popupStack.Remove(controller);
7575

76-
foreach (var persistant in persistentStack)
77-
if (persistant.State == ControllerState.ViewBlurred)
78-
persistant.Focus();
76+
if (popupStack.Count == 0)
77+
{
78+
foreach (var persistant in persistentStack)
79+
if (persistant.State == ControllerState.ViewBlurred)
80+
persistant.Focus();
81+
}
82+
7983

8084
return new PopupPopInfo(
8185
new CanvasOrdering(CanvasOrdering.SortingLayer.Popup, ((popupStack.Count - 1) * 2) - 1),

0 commit comments

Comments
 (0)