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

Commit

Permalink
Use browser process for closing tabs for tab page close
Browse files Browse the repository at this point in the history
Fix #11028

Auditors: NejcZdovc
  • Loading branch information
bbondy committed Sep 22, 2017
1 parent 0c0524c commit aadb3bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/renderer/reducers/contextMenuReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ const onTabPageMenu = function (state, action) {
}, {
label: locale.translation('closeTabPage'),
click: () => {
windowActions.closeFrames(tabPageFrames)
tabPageFrames
.map((frame) => frame.get('tabId'))
.forEach((tabId) => appActions.tabCloseRequested(tabId))
}
}]

Expand Down
2 changes: 2 additions & 0 deletions app/renderer/reducers/frameReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ const frameReducer = (state, action, immutableAction) => {

case windowConstants.WINDOW_CLOSE_FRAME:
state = closeFrame(state, action)
const activeFrame = frameStateUtil.getActiveFrame(state)
state = frameStateUtil.updateTabPageIndex(state, activeFrame.get('tabId'))
break

case windowConstants.WINDOW_SET_FULL_SCREEN:
Expand Down

0 comments on commit aadb3bb

Please sign in to comment.