diff --git a/js/components/frame.js b/js/components/frame.js index 85ecf9a2009..e889651112b 100644 --- a/js/components/frame.js +++ b/js/components/frame.js @@ -734,7 +734,7 @@ class Frame extends ImmutableComponent { }) this.webview.addEventListener('hide-autofill-popup', (e) => { if (this.props.contextMenuDetail && this.props.contextMenuDetail.get('type') === 'autofill' && - this.webview.isFocused()) { + (this.props.contextMenuDetail.get('tabId') !== this.props.tabId || this.webview.isFocused())) { windowActions.autofillPopupHidden(this.props.tabId) } }) diff --git a/test/components/autofillTest.js b/test/components/autofillTest.js index 8af41e03920..219066decae 100644 --- a/test/components/autofillTest.js +++ b/test/components/autofillTest.js @@ -614,4 +614,39 @@ describe('Autofill', function () { }) }) }) + describe('autofill context menu', function () { + Brave.beforeAll(this) + before(function * () { + yield setup(this.app.client) + this.formfill = Brave.server.url('formfill.html') + yield this.app.client + .tabByIndex(0) + .loadUrl(this.formfill) + .waitForVisible('