VSCodeVim / VSCodeVim/Vim

Failed to handle key=a. Cannot read property 'getFocusElement' of null

Open
#6,187 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area/remap kind/bug
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

To Reproduce
Steps to reproduce the behavior:

Include the following in settings.json:

    "vim.leader": "<space>",
    "vim.normalModeKeyBindings": [
        {
            "before": [
                "<leader>",
                "a"
            ],
            "commands": [
                "problems.action.showQuickFixes"
            ]
        }
    ]

Then go to a problem in the code. Attempt to do <space>a to bring up quickfix, and the given problem occurs. In the same position if you hit Ctr + period key, it brings up the quickfix menu.

VSCodeVim version: 1.18.9

Stack trace
TypeError: Cannot read property 'getFocusElement' of null
    at handler (file:///usr/share/vscodium-bin/resources/app/out/vs/workbench/workbench.desktop.main.js:2555:1426)
    at C.invokeFunction (file:///usr/share/vscodium-bin/resources/app/out/vs/workbench/workbench.desktop.main.js:614:20943)
    at C._tryExecuteCommand (file:///usr/share/vscodium-bin/resources/app/out/vs/workbench/workbench.desktop.main.js:1534:3492)
    at file:///usr/share/vscodium-bin/resources/app/out/vs/workbench/workbench.desktop.main.js:1534:3241

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the problem with the shown settings.json mapping for a and the problems.action.showQuickFixes command while a problem is selected. Compare that path with Ctrl+. and trace the keybinding command handling until the null getFocusElement call is identified; done means the mapping opens the quick-fix menu without the error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vim
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.