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

Staging changes in source control moves cursor-focus (it's back) #120162

Open
sebastianvitterso opened this issue Mar 30, 2021 · 8 comments
Open
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug scm General SCM compound issues
Milestone

Comments

@sebastianvitterso
Copy link

sebastianvitterso commented Mar 30, 2021

Issue Type: Bug

  1. Have a sub-repo in your repo.
  2. Stage a change
  3. Quickly begin to write a message in the main repo's commit-message-input
  4. Observe that focus is shifted to the second repo's commit-input
2021-03-30.11-02-39.mp4

VS Code version: Code 1.54.3 (2b9aebd, 2021-03-15T10:55:45.459Z)
OS version: Windows_NT x64 10.0.19042

System Info
Item Value
CPUs Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz (8 x 2304)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.68GB (2.65GB free)
Process Argv --crash-reporter-id 7ee3133f-3bba-415e-93fd-736c3a18e9cf
Screen Reader no
VM 0%
Extensions (17)
Extension Author (truncated) Version
atlascode atl 2.8.6
vscode-intelephense-client bme 1.6.3
vscode-tailwindcss bra 0.5.9
netcore-snippets dog 3.15.1
gitlens eam 11.3.0
csharp ms- 1.23.9
python ms- 2021.3.680753044
jupyter ms- 2021.3.684299474
vscode-typescript-tslint-plugin ms- 1.3.3
vsliveshare ms- 1.0.4018
vetur oct 0.33.1
laravel-blade one 1.25.0
java red 0.76.0
vscode-yaml red 0.17.0
msbuild-project-tools tin 0.3.15
material-theme zhu 3.9.15
vscode-proto3 zxh 0.5.3
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244:30276681
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt875:30259475
pythontb:30265425
pythonvspyt943cf:30280190
vsget980:30279783
vspre833:30267464
pythonptprofiler:30281270
vshan820cf:30276953

@vscodebot
Copy link

vscodebot bot commented Mar 30, 2021

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@sebastianvitterso
Copy link
Author

I know this has been an issue many times before, and I suspect that this time it is the result of a remediation where it just takes "a random" commit-message input field and focuses it, which might work for projects with only one repo, but if one has multiple repositories, it sure doesn't work properly.

@eamodio eamodio added scm General SCM compound issues bug Issue identified by VS Code Team member as probable bug labels Apr 1, 2021
@eamodio eamodio added this to the April 2021 milestone Apr 1, 2021
@eamodio eamodio modified the milestones: April 2021, Backlog Apr 1, 2021
@lszomoru lszomoru assigned lszomoru and unassigned eamodio Oct 4, 2021
@TristanBarlow
Copy link

I have noticed this also, its really annoying.

@tonypags
Copy link

tonypags commented Oct 12, 2021

I have almost the same exact issue. There are several repos in my list and if I perform any action with git (fetch, pull, add, etc) it usually takes a couple seconds for git to finish and the UI to return to idle. During this non-idle time, anything I type in any of the fields for any repo will be randomly moved around so that my sentence is in many places in bits and pieces.

When I open the git shell to investigate, there are no issues.

I have reinstalled/upgraded vscode, git, and disabled all extensions. Issue remains. Started a couple weeks ago maybe.

Furthermore, the current branch displayed for any of my repos starts changing. Most of my repos have the same branch schema, but a few of them are unique and I see them popping up under other repos. It's almost like the repos (from vscode POV) are swapping identities. In the GIF below, the branch name does not exist under the 2nd repo, but there it is. It also happens when I start vscode and the repos load.

vscode-issue120162

EDIT: I solved my issue:
I had a repo where I replaced master with a new main branch and didn't fully clean up after myself correctly. Once I unlocked the branch on the origin and repointed the HEAD, my issue went away. This post helped me. I hope this helps someone.

@radix
Copy link

radix commented Oct 19, 2021

I was also getting this behavior and it was because I had some out-of-date .gitmodules that were referring to non-existent paths. regular commands like git fetch and so on weren't failing so I didn't notice this, but it seems however vscode was interacting with my git repository was causing it to break. So I guess the actual bug here is that the focus gets moved to the last commit box whenever any automated git command fails??

edit to mention that for me it was also happening ALL THE TIME as I was trying to type into my commit message which made it really annoying; it wasn't only when I was staging my changes like the issue title says.

@kangalio
Copy link

This happens almost every time I try to commit. VSCode particularly likes to jump focus to this particular project, whose input field looks like this by now
Screenshot_20211217_221415

As a workaround I've started creating a new tab, typing the commit message there and then copy-pasting it back into the input field

@jonnyyu
Copy link

jonnyyu commented Mar 7, 2024

I met a similar issue when I finish a commit and set focus to command window, and the focus is always set back to the git commit message text box, this is quite annoying.

@sebastianvitterso
Copy link
Author

I no longer use git submodules, so I can't attest to whether this problem still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug scm General SCM compound issues
Projects
None yet
Development

No branches or pull requests

8 participants