From e0770b15dc30dd0d12ff495e77ee860f9c00e47c Mon Sep 17 00:00:00 2001 From: Brian Clifton Date: Fri, 16 Dec 2016 01:29:22 -0700 Subject: [PATCH] Put back in handler for null/empty context menu detail. This is required in order to hide any ContextMenu object Caused by https://github.com/brave/browser-laptop/commit/7fb2e4c30c98b592c00fc390648f99672a6caad7#diff-733d30fbf34816322d3f25dd59c1eb99 Fixes https://github.com/brave/browser-laptop/issues/6236 Auditors: @bridiver, @darkdh Test Plan: 1. Launch Brave and use the kabob / cheeseburger icon 2. Notice the context menu comes up 3. Click anywhere on the screen (outside of the context menu) 4. Notice context menu closes itself --- js/stores/windowStore.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/stores/windowStore.js b/js/stores/windowStore.js index b4e199e2364..4cba42b4ed8 100644 --- a/js/stores/windowStore.js +++ b/js/stores/windowStore.js @@ -658,9 +658,10 @@ const doAction = (action) => { case windowConstants.WINDOW_AUTOFILL_POPUP_HIDDEN: case windowConstants.WINDOW_SET_CONTEXT_MENU_DETAIL: if (!action.detail) { + windowState = windowState.delete('contextMenuDetail') + 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) }