mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 14:31:31 +01:00
better way of finding out active list (for #11517)
This commit is contained in:
@@ -286,7 +286,7 @@ export class List<T> implements IDisposable {
|
||||
this.disposables = [this.focus, this.selection, this.view, this._onDispose];
|
||||
|
||||
const tracker = DOM.trackFocus(this.view.domNode);
|
||||
this.disposables.push(tracker.addFocusListener(() => setTimeout(() => this._onDOMFocus.fire())));
|
||||
this.disposables.push(tracker.addFocusListener(() => this._onDOMFocus.fire()));
|
||||
this.disposables.push(tracker.addBlurListener(() => this._onDOMBlur.fire()));
|
||||
|
||||
if (typeof options.keyboardSupport !== 'boolean' || options.keyboardSupport) {
|
||||
@@ -469,6 +469,10 @@ export class List<T> implements IDisposable {
|
||||
return this.view.domNode === document.activeElement;
|
||||
}
|
||||
|
||||
getHTMLElement(): HTMLElement {
|
||||
return this.view.domNode;
|
||||
}
|
||||
|
||||
private toListEvent({ indexes }: ITraitChangeEvent) {
|
||||
return { indexes, elements: indexes.map(i => this.view.element(i)) };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user