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

Commit

Permalink
Put back in handler for null/empty context menu detail. This is requi…
Browse files Browse the repository at this point in the history
…red in order to hide any ContextMenu object

Caused by 7fb2e4c#diff-733d30fbf34816322d3f25dd59c1eb99

Fixes #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
  • Loading branch information
bsclifton authored and cezaraugusto committed Dec 20, 2016
1 parent 64fe349 commit 3e36a71
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/stores/windowStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 3e36a71

Please sign in to comment.