From 68d8db6ac5b7fd0f157c406dec9d8b611dc68124 Mon Sep 17 00:00:00 2001 From: Anthony Tseng Date: Mon, 31 Oct 2016 10:45:47 -0400 Subject: [PATCH] Implement hide-autofill-popup fix #3816 fix #4540 fix #5023 Auditors: @bbondy Test Plan: 1. Go to https://github.com/brave/browser-laptop/issues 2. In the filters textbox, start typing characters until autocomplete pops up 3. Push enter to submit 4. Scroll the page should dismiss the popup 1. Go to https://github.com/brave/browser-laptop/issues 2. In the filters textbox, start typing characters until autocomplete pops up 3. Push enter to submit 4. Popup should be dismissed --- js/components/frame.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/components/frame.js b/js/components/frame.js index 327c70e8597..613aac1b82c 100644 --- a/js/components/frame.js +++ b/js/components/frame.js @@ -804,8 +804,10 @@ class Frame extends ImmutableComponent { contextMenus.onShowAutofillMenu(e.suggestions, e.rect, this.frame) }) this.webview.addEventListener('hide-autofill-popup', (e) => { - // TODO(Anthony): conflict with contextmenu - // windowActions.setContextMenuDetail() + let webContents = this.webview.getWebContents() + if (webContents && webContents.isFocused()) { + windowActions.setContextMenuDetail() + } }) this.webview.addEventListener('ipc-message', (e) => { let method = () => {}