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);