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

Mouse navigation does not work correctly when viewing documents side-by-side #4

Open
thomaskrowe opened this issue Jul 5, 2015 · 4 comments

Comments

@thomaskrowe
Copy link

Steps for reproducing this issue:

  1. Open Visual Studio.
  2. Open some text file.
  3. Open another text file.
  4. Arrange both windows side-by-side (e.g. the first one on the left, the second one on the right).
  5. Position the cursor by clicking at some text positions in the left window.
  6. Position the cursor by clicking at some text positions in the right window.
  7. Again, position the cursor by clicking at some text positions in the left window.
  8. Hit the back button on the mouse a couple of times.

The first couple of backnavs will work correctly. However, as soon as the cursor moves back to the right window, one will not be able to do any more backnavs. By hovering the mouse over the right window one will be able to do some more backnavs, until the cursor moves back to the left window.

This behavior differs from the behavior that Visual Studio exhibits when one uses the Navigate Backward menu button or the corresponding keyboard shortcut.

Unfortunately, this probably limits the usability of this extension for users with large monitors (which become more and more common nowadays) who are usually editing multiple documents in side-by-side view.

@sharwell sharwell added the bug label Jul 5, 2015
@sharwell
Copy link
Member

sharwell commented Jul 5, 2015

Hi @thomaskrowe,

Thanks for taking the time to report this, complete with steps to reproduce the issue. I agree that multiple windows side-by-side is a common scenario. In fact, I'm using that feature right now. 😄

💭 I haven't looked into the specifics or tested this, but my guess is clicking the mouse buttons is setting focus to the window underneath the mouse pointer, changing the meaning of "back" and/or "forward" right at the time you are trying to execute the command. It's a pretty simple extension; I'm going to mark this up for grabs in case someone else wants to find a solution before I'm able to get to it. If this turns out to be the actual cause, I'm going to guess it's also the underlying cause of #3.

@zastrowm
Copy link

I'm looking at fixing this. Before I do so, I'd like to ask the following so that I don't screw anything else up: what was the reasoning of overriding PostprocessMouseUp versus the other handlers (PreprocessMouseUp or PreprocessMouseDown)?

@sharwell
Copy link
Member

I'm not sure. It's been in place for a long time:
tunnelvisionlabs/LangSvcV2@3d2d5ac

@zastrowm
Copy link

my guess is clicking the mouse buttons is setting focus to the window underneath the mouse pointer, changing the meaning of "back" and/or "forward" right at the time you are trying to execute the command.

That does seem to be the issue, from my investigation. The "quick" fix that I was hoping for, of changing the method that is overridden to PreprocessMouseDown does not work 😞. It seems like VS changes focus no matter if the event is marked as handled in any of the ____Mouse____ Preprocess/Postprocess & Down/Up events.

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

3 participants