Skip to content

Commit dafda57

Browse files
committed
refactor: remove unused event listener cleanup and enhance focus target selection logic
1 parent 0d33244 commit dafda57

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

applications/virtual-fly-brain/frontend/src/components/StackViewerComponent.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1806,9 +1806,6 @@ const StackViewerComponent = () => createClass({
18061806
},
18071807

18081808
componentWillUnmount: function () {
1809-
if (this._wheelListenerElem && this._wheelListenerCallback) {
1810-
this._wheelListenerElem.removeEventListener(support, this._wheelListenerCallback);
1811-
}
18121809
this._isMounted = false;
18131810
return true;
18141811
},

applications/virtual-fly-brain/frontend/src/reducers/middleware/urlUpdaterMiddleware.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ const isFirstTimeLoad = (allLoadedInstances, store) => {
7777
store.dispatch(setBulkLoadingCount(instancesToLoad.length));
7878
}
7979

80-
const focusTarget = idSelected || uniqueLoadOrder[uniqueLoadOrder.length - 1];
80+
const focusTarget = queuedInstances.length > 0
81+
? queuedInstances[queuedInstances.length - 1]
82+
: (idSelected || uniqueLoadOrder[uniqueLoadOrder.length - 1]);
8183

8284
uniqueLoadOrder.forEach(id => {
8385
const shouldFocus = id === focusTarget;

0 commit comments

Comments
 (0)