Skip to content

Commit

Permalink
Remove workaround for IE (#71553 #81272)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Sep 23, 2019
1 parent fe5315b commit 944a1a5
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions 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._editorWidgetFocus.getValue() === BooleanEventValue.True);
return this._focusTracker && this._focusTracker.hasFocus();
}

public addContentWidget(widget: editorBrowser.IContentWidget): void {
Expand Down Expand Up @@ -1454,8 +1454,6 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
const viewOutgoingEvents = new ViewOutgoingEvents(viewModel);
viewOutgoingEvents.onDidGainFocus = () => {
this._editorTextFocus.setValue(true);
// In IE, the focus is not synchronous, so we give it a little help
this._editorWidgetFocus.setValue(true);
};

viewOutgoingEvents.onDidScroll = (e) => this._onDidScrollChange.fire(e);
Expand Down Expand Up @@ -1548,10 +1546,6 @@ 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 944a1a5

Please sign in to comment.