Skip to content

Fixed: Right click doesn't always select the file/folder hovered over #10078

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

Merged
merged 2 commits into from
Sep 29, 2022

Conversation

ferrariofilippo
Copy link
Contributor

Resolved / Related Issues
Items resolved / related issues by this PR.

Comments
I changed RightTapped event-area, applying it to items' container (same as #9977 )
If you think this is ok, I'll proceed with code cleanup (remove nullable warnings)

Validation
How did you test these changes?

  • Built and ran the app

@yaira2
Copy link
Member

yaira2 commented Sep 29, 2022

Looks good to me, assuming you tested with touch and the keyboard shortcut (I can test touch if you want).

@ferrariofilippo
Copy link
Contributor Author

Looks good to me, assuming you tested with touch and the keyboard shortcut (I can test touch if you want).

Yes, please. I have no way of testing with touch, it would be great if you could help me with that

@yaira2
Copy link
Member

yaira2 commented Sep 29, 2022

I seem to be getting an unhandled exception even without touch on the grid layouts "--------- UNHANDLED EXCEPTION ---------\n>>>> HRESULT: -2147467262\n\n--- MESSAGE ---Unable to cast object of type 'Microsoft.UI.Xaml.Controls.GridViewItem' to type 'Microsoft.UI.Xaml.Controls.ListViewItem'.\n--- STACKTRACE --- at Files.App.BaseLayout.FileListItem_RightTapped(Object sender, RightTappedRoutedEventArgs e)\r\n at ABI.Microsoft.UI.Xaml.Input.RightTappedEventHandler.Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr e)\r\n--- End of stack trace from previous location ---\r\n at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr)\r\n at ABI.Windows.ApplicationModel.Core.IUnhandledErrorMethods.Propagate(IObjectReference _obj)\r\n at Microsoft.AppCenter.Utils.ApplicationLifecycleHelperWinUI.<.ctor>b__0_3(Object sender, UnhandledErrorDetectedEventArgs eventArgs)\r\n--- End of stack trace from previous location ---\r\n at Microsoft.AppCenter.Utils.ApplicationLifecycleHelperWinUI.<.ctor>b__0_3(Object sender, UnhandledErrorDetectedEventArgs eventArgs)\r\n at ABI.System.EventHandler1.Do_Abi_Invoke[TAbi](Void* thisPtr, IntPtr sender, TAbi args)\n--- SOURCE ---System.Private.CoreLib---------------------------------------"

@ferrariofilippo
Copy link
Contributor Author

I'll check

@yaira2
Copy link
Member

yaira2 commented Sep 29, 2022

List view looks good though 👍

@ferrariofilippo
Copy link
Contributor Author

Anyway, I'm not sure about the keyboard right-click behaviour.
Let me explain: if I'm navigating using the keyboard I'll expect to open the context menu of the selected item, not the hovered one. If you left the mouse over an item, opening the context menu would open the one of the file hovered and it would be annoying.

@yaira2
Copy link
Member

yaira2 commented Sep 29, 2022

I agree, I meant to test that it still worked for the selected item 👍

@ferrariofilippo
Copy link
Contributor Author

I agree, I meant to test that it still worked for the selected item 👍

Ok

Copy link
Member

@yaira2 yaira2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a really nice change! LGTM

@yaira2 yaira2 added the ready to merge Pull requests that are approved and ready to merge label Sep 29, 2022
@yaira2 yaira2 merged commit 64fb0b6 into files-community:main Sep 29, 2022
@ferrariofilippo ferrariofilippo deleted the Fixed_Right_Click_#9834 branch October 1, 2022 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Right click doesn't always select the file/folder hovered over
2 participants