This commit is contained in:
Joao Moreno
2017-07-24 10:59:46 +02:00
parent df2cdb1a42
commit a188171bf8
5 changed files with 23 additions and 15 deletions

View File

@@ -620,11 +620,8 @@ export class List<T> implements ISpliceable<T>, IDisposable {
return mapEvent(this._onPin.event, indexes => this.toListEvent({ indexes }));
}
private _onDOMFocus = new Emitter<void>();
get onDOMFocus(): Event<void> { return this._onDOMFocus.event; }
private _onDOMBlur = new Emitter<void>();
get onDOMBlur(): Event<void> { return this._onDOMBlur.event; }
readonly onDOMFocus: Event<void>;
readonly onDOMBlur: Event<void>;
private _onDispose = new Emitter<void>();
get onDispose(): Event<void> { return this._onDispose.event; }
@@ -660,9 +657,8 @@ export class List<T> implements ISpliceable<T>, IDisposable {
this.disposables = [this.focus, this.selection, this.view, this._onDispose];
const tracker = DOM.trackFocus(this.view.domNode);
this.disposables.push(tracker.addFocusListener(() => this._onDOMFocus.fire()));
this.disposables.push(tracker.addBlurListener(() => this._onDOMBlur.fire()));
this.onDOMFocus = mapEvent(domEvent(this.view.domNode, 'focus', true), () => null);
this.onDOMBlur = mapEvent(domEvent(this.view.domNode, 'blur', true), () => null);
if (typeof options.keyboardSupport !== 'boolean' || options.keyboardSupport) {
const controller = new KeyboardController(this, this.view);