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

Right-clicking a file should not open, should only show context menu #1112

Closed
internationils opened this issue May 7, 2024 · 7 comments
Closed
Assignees

Comments

@internationils
Copy link

Right-clicking a file in the explorer view should not open, should only show context menu. Sometimes I just want to rename a file or something else from the context menu. The left button does the opening, right should only be context.

@RickStrahl
Copy link
Owner

Agree. Handling selections is really tricky unfortunately with changes potentially having lots of side effects because there are so many combinations of operations related to clicks.

If I recall the decision was made explicitly originally because it severely complicated things by not moving the selection.

Taking a look around various applications most - but not all - do what you suggest, ie. they don't navigate.

@RickStrahl RickStrahl self-assigned this May 9, 2024
@RickStrahl
Copy link
Owner

Ok I was able to make this work.

I also added the filename to the top of the context menu so there's no confusion what you're working with.

image

Fix in 3.2.17.1

@internationils
Copy link
Author

internationils commented May 9, 2024

Mostly fixed... if you right click and get the context menu, and then accidentally right click on the file while the context window is open (it was an honest misclick, I promise!! : ) then it still shows up in the preview.
What are you using to do the screen recording in the other bug? It might help you see something I'm not explaining on a bug or two that I file.

@RickStrahl
Copy link
Owner

RickStrahl commented May 9, 2024

Hmmm... damn this is complex. The issue is that in order to handle all these special click scenarios MM does low level mouse and key handling and there 3 different mouse click events that interact.

Played around with this with rapid clicks and 'misclicks' and sure enough I was able to occasionally right click and open a document. Still couldn't quite make out what the issue was.

But after a bit of sleuthing I finally figured out that the MouseUp event was still firing and depending on how quickly the button was released. So it was working most of the time but not always.

IAC I think I have the fix for this now:

// in MouseUp
if (e.ChangedButton == MouseButton.Right || e.RightButton == MouseButtonState.Pressed)
{
    isDoubleClick = false;
    return;
}

Incidentally the 'misclicks' would also result in crashes on many occasions, so this should fix that as well. I think this fixes potentially a number of related issues where double clicks and/or right clicks are involved which should improve behavior of the folder view in general.

@internationils
Copy link
Author

Nice! Let me know when there is a new version again... no hurry on this one. Could you have a look at #1091 ? as I'm structuring chapters and sections I do a lot of moving and that one is annoying...

@RickStrahl
Copy link
Owner

3.2.17.3

@internationils
Copy link
Author

Seems fixed, I can now spam-right-click and only get the context window and nothing opens, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants