Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Fixed issue where textbox for renaming wouldn't disappear after losing focus #13282

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/Files.App/Views/LayoutModes/DetailsLayoutBrowser.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,20 @@ private async void FileList_ItemTapped(object sender, TappedRoutedEventArgs e)
var clickedItem = e.OriginalSource as FrameworkElement;
var ctrlPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down);
var shiftPressed = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down);
var item = (e.OriginalSource as FrameworkElement)?.DataContext as ListedItem;
var item = clickedItem?.DataContext as ListedItem;
if (item is null)
{
if (IsRenamingItem)
{
ListViewItem listViewItem = FileList.ContainerFromItem(RenamingItem) as ListViewItem;
if (listViewItem is not null)
{
var textBox = listViewItem.FindDescendant("ItemNameTextBox") as TextBox;
await CommitRename(textBox);
}
}
return;
}

// Skip code if the control or shift key is pressed or if the user is using multiselect
if
Expand Down