Skip to content

Commit

Permalink
fix(panel): close panel and word editer on esc
Browse files Browse the repository at this point in the history
  • Loading branch information
crimx committed May 12, 2018
1 parent f9984f5 commit d133d6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/content/redux/modules/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export default function reducer (state = initState, action): WidgetState {
isPinned: false,
shouldPanelShow: false,
shouldBowlShow: false,
isPanelAppear: false
isPanelAppear: false,
shouldWordEditorShow: false,
}
case Actions.PIN:
return { ...state, isPinned: !state.isPinned }
Expand Down Expand Up @@ -155,7 +156,7 @@ export function startUpAction (): Dispatcher {
popupPageInit(dispatch, getState)
}

// close panel on esc
// close panel and word editor on esc
message.self.addListener(MsgType.EscapeKey, () => {
dispatch(closePanel() as any)
})
Expand Down

0 comments on commit d133d6e

Please sign in to comment.