From 71b0b26b1dc218cdf86d33ce648d0e5276b81805 Mon Sep 17 00:00:00 2001 From: Dominic Valenciana Date: Tue, 20 Feb 2018 17:34:04 -0700 Subject: [PATCH] Added focus to quick fix widget click so that behavior of pressing CMD+. is mirrored --- src/vs/editor/contrib/quickFix/lightBulbWidget.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vs/editor/contrib/quickFix/lightBulbWidget.ts b/src/vs/editor/contrib/quickFix/lightBulbWidget.ts index fa09031b8a556..d7bed84405abf 100644 --- a/src/vs/editor/contrib/quickFix/lightBulbWidget.ts +++ b/src/vs/editor/contrib/quickFix/lightBulbWidget.ts @@ -39,6 +39,8 @@ export class LightBulbWidget implements IDisposable, IContentWidget { this._disposables.push(this._editor.onDidChangeModel(_ => this._futureFixes.cancel())); this._disposables.push(this._editor.onDidChangeModelLanguage(_ => this._futureFixes.cancel())); this._disposables.push(dom.addStandardDisposableListener(this._domNode, 'click', e => { + // Make sure that focus / cursor location is not lost when clicking widget icon + this._editor.focus(); // a bit of extra work to make sure the menu // doesn't cover the line-text const { top, height } = dom.getDomNodePagePosition(this._domNode);