github / VisualStudio

GitHub Extension for Visual Studio
https://visualstudio.github.com
MIT License
2.38k stars 1.2k forks source link

When adding inline comment, keyboard focus can be split between text box and diff text #1588

Open jcansdale opened 6 years ago

jcansdale commented 6 years ago

What happened (with steps, logs and screenshots, if possible)

When opening a comment inline in a peek view within a comparison window, keyboard focus seems to get "split" between the two panes of the comparison window. The following gif shows this behavior:

2018-04-09_11-26-53

  1. Open a PR using GitHub for Visual Studio
  2. Double-click a changed file to show the diff view
  3. Click a line's margin to add an inline comment
  4. Click on LHS of comparison window
  5. Click on comment text box (on RHS view)
  6. Enter some text in the comment box and then use the arrow keys to navigate
  7. See that the cursor moves in the LHS of the diff view rather than in the currently focused comment text box

As you can see from the gif posted above, the keyboard focus seems is set to the comment text box when this happens.

grokys commented 6 years ago

@olegtk just tried in 15.8.0. Preview 5.0 and this is still a problem.

olegtk commented 6 years ago

That's weird, the same issue doesn't repro anymore with a regular Peek in Diff. I guess your Peek presentation is somehow different. You still need InterceptsCommandRouting I believe. So I'd guess that #1599 is still needed. I'll try it later when I get to my machine.

olegtk commented 6 years ago

damn, looks like we fixed it only for scenario when Peek contains a text view (IVsCodeWindow more specifically) :( I will reactivate the bug.