Skip to content

Commit

Permalink
Fix immutable.getIn and autofillPopupHidden condition
Browse files Browse the repository at this point in the history
  • Loading branch information
darkdh committed Dec 15, 2016
1 parent b9ec9a5 commit 3004961
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion js/components/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,10 @@ class Frame extends ImmutableComponent {
contextMenus.onShowAutofillMenu(e.suggestions, e.rect, this.frame)
})
this.webview.addEventListener('hide-autofill-popup', (e) => {
windowActions.autofillPopupHidden(this.props.tabId)
let webContents = this.webview.getWebContents()
if (webContents && webContents.isFocused()) {
windowActions.autofillPopupHidden(this.props.tabId)
}
})
this.webview.addEventListener('ipc-message', (e) => {
let method = () => {}
Expand Down
4 changes: 2 additions & 2 deletions js/stores/windowStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,8 @@ const doAction = (action) => {
case windowConstants.WINDOW_AUTOFILL_POPUP_HIDDEN:
case windowConstants.WINDOW_SET_CONTEXT_MENU_DETAIL:
if (!action.detail) {
if (windowState.getIn('contextMenuDetail', 'type') === 'autofill' &&
windowState.getIn('contextMenuDetail', 'tabId') === action.tabId) {
if (windowState.getIn(['contextMenuDetail', 'type']) === 'autofill' &&
windowState.getIn(['contextMenuDetail', 'tabId']) === action.tabId) {
windowState = windowState.delete('contextMenuDetail')
if (action.notify) {
ipc.send('autofill-popup-hidden', action.tabId)
Expand Down

0 comments on commit 3004961

Please sign in to comment.