Skip to content

Commit 5b710c5

Browse files
authored
Fix: Fixed issue where a text box would remain visible in the tiles layout when returning from a new tab (#12693)
1 parent dfb0caa commit 5b710c5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Files.App/Views/LayoutModes/GridViewBrowser.xaml.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,13 @@ override public void StartRenameItem()
197197
OldItemName = textBlock.Text;
198198
textBlock.Visibility = Visibility.Collapsed;
199199
textBox.Visibility = Visibility.Visible;
200+
201+
if (textBox.FindParent<Grid>() is null)
202+
{
203+
textBlock.Visibility = Visibility.Visible;
204+
textBox.Visibility = Visibility.Collapsed;
205+
return;
206+
}
200207
}
201208

202209
textBox.Focus(FocusState.Pointer);

0 commit comments

Comments
 (0)