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

quickfix context menu cant be toggled off from extension #88628

Closed
ctf0 opened this issue Jan 14, 2020 · 7 comments
Closed

quickfix context menu cant be toggled off from extension #88628

ctf0 opened this issue Jan 14, 2020 · 7 comments
Assignees
Labels
*dev-question VS Code Extension Development Question info-needed Issue requires more information from poster

Comments

@ctf0
Copy link

ctf0 commented Jan 14, 2020

Env

Version: 1.42.0-insider
Commit: 980d8ef1371b14e80162d88e88f45e15f8632070
Date: 2020-01-14T09:03:12.949Z
Electron: 7.1.7
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 18.7.0

Steps to Reproduce:

  1. run editor.action.quickFix from extension
  2. re-run it again, it wont go away
  3. using hideSuggestWidget wont work either

an example of usage could be found at https://github.com/ctf0/vscode-problems-fix-runner/blob/master/extension.js#L111

the funny thing is the cursor can change its position and the context menu still persist.

Does this issue occur when all extensions are disabled?: Yes

@jrieken jrieken added the info-needed Issue requires more information from poster label Jan 15, 2020
@jrieken
Copy link
Member

jrieken commented Jan 15, 2020

Yeah, quickFix opens a native menus (if quick fixes are available) and there is no command to hide that. It's a user menu and only the user should close this. Why is this a problem? What are you trying to achieve?

@ctf0
Copy link
Author

ctf0 commented Jan 15, 2020

am building an extension that loop over the quick fixable problems in the document and give the user the chance to chose the fix per each, so he/she doesn't need to do the manual labor.

the issue is i can toggle the menu on/off with the same keybinding or with escape but i cant do that from the extension.
like running editor.action.quickFix multiple times in a row wont do anything, its like the menu has hijacked the focus from the editor and u cant control it anymore.

if there is a way i can simulate pressing a key from the ext "the escape key in our case" that would solve it

@jrieken
Copy link
Member

jrieken commented Jan 15, 2020

am building an extension that loop over the quick fixable problems in the document and give the user the chance to chose the fix per each, so he/she doesn't need to do the manual labor.

Not sure that I understand. Is this like the editor.codeActionsOnSave-setting (which applies fixes on save)? Generally, you cannot interact with the UX. While most things work with commands, some don't esp. those that are native and outside our control.

@ctf0
Copy link
Author

ctf0 commented Jan 15, 2020

i apologies if i wasn't clear, heres what i meant


to test the example for ur self, plz follow

tset

cosnt

@jrieken
Copy link
Member

jrieken commented Jan 15, 2020

Ok, I understand but I also have to disappoint you to say that this isn't something extensions are for. You can programmatically get code actions via the vscode.executeCodeActionProvider-command but cannot drive the UI like that.

@jrieken jrieken added the *dev-question VS Code Extension Development Question label Jan 15, 2020
@vscodebot
Copy link

vscodebot bot commented Jan 15, 2020

We have a great developer community over on slack where extension authors help each other. This is a great place for you to ask questions and find support.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Jan 15, 2020
@ctf0
Copy link
Author

ctf0 commented Jan 15, 2020

ok np, is there a way to simulate a key press ?
also could u tell me what quickFixWidgetVisible is for or how to use it ?

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*dev-question VS Code Extension Development Question info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants