Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Only update tabPageIndex if user is not hovering other tab
Browse files Browse the repository at this point in the history
Fix #9779
Auditors: @bridiver
  • Loading branch information
cezaraugusto committed Jun 30, 2017
1 parent fd26195 commit b3170ad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/renderer/reducers/frameReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,14 @@ const frameReducer = (state, action, immutableAction) => {
}
state = state.setIn(['frames', index, 'lastAccessedTime'], new Date().getTime())

state = frameStateUtil.updateTabPageIndex(state, frame)
// Only update tabPage if user is not hovering other page
// Otherwise each time the active tab is updated the tabPage
// will be updated as well. While we want that behavior not necessarily
// the user will be on the same tabPage as the active tab. See bug #9779
const isPreviewing = state.get('frames').some(frame => frame.get('hoverState'))
if (!isPreviewing) {
state = frameStateUtil.updateTabPageIndex(state, frame)
}
}
}
break
Expand Down

0 comments on commit b3170ad

Please sign in to comment.