replace focus listener with Workspace.observeActivePaneItem
MODIFY
lib/project/results-view.js
lib/project/results-view.js
@@ -62,10 +62,10 @@ class ResultsView {
const resizeObserver = new ResizeObserver(this.invalidateItemHeights.bind(this));
resizeObserver.observe(this.element);
this.element.addEventListener('mousedown', this.handleClick.bind(this));
- this.element.addEventListener('focus', this.maintainPreviousScrollPosition.bind(this));
this.subscriptions = new CompositeDisposable(
atom.config.observe('editor.fontFamily', this.fontFamilyChanged.bind(this)),
+ atom.workspace.observeActivePaneItem(this.maintainPreviousScrollPosition.bind(this)),
this.model.onDidAddResult(this.didAddResult.bind(this)),
this.model.onDidSetResult(this.didSetResult.bind(this)),
this.model.onDidRemoveResult(this.didRemoveResult.bind(this)),

replace focus listener with Workspace.observeActivePaneItem