Skip to content

Commit

Permalink
Have hasWidgetFocus return the same underlying value as the event s…
Browse files Browse the repository at this point in the history
…ource (#71553)
  • Loading branch information
alexdima committed Sep 11, 2019
1 parent e229ff6 commit a98ae68
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vs/editor/browser/widget/codeEditorWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
}

public hasWidgetFocus(): boolean {
return this._focusTracker && this._focusTracker.hasFocus();
return (this._editorWidgetFocus.getValue() === BooleanEventValue.True);
}

public addContentWidget(widget: editorBrowser.IContentWidget): void {
Expand Down Expand Up @@ -1548,6 +1548,10 @@ export class BooleanEventEmitter extends Disposable {
this._value = BooleanEventValue.NotSet;
}

public getValue(): BooleanEventValue {
return this._value;
}

public setValue(_value: boolean) {
const value = (_value ? BooleanEventValue.True : BooleanEventValue.False);
if (this._value === value) {
Expand Down

0 comments on commit a98ae68

Please sign in to comment.