mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[PM-5189] Fixing issue with how we remove the inline menu when a field is populated
This commit is contained in:
@@ -460,11 +460,13 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ
|
||||
this.clearUserInteractionEventTimeout();
|
||||
const initiallyFocusedField = this.mostRecentlyFocusedField;
|
||||
await this.updateMostRecentlyFocusedField(formFieldElement);
|
||||
const formElementHasValue = Boolean((formFieldElement as HTMLInputElement).value);
|
||||
|
||||
if (
|
||||
this.inlineMenuVisibility === AutofillOverlayVisibility.OnButtonClick ||
|
||||
(formElementHasValue && initiallyFocusedField !== this.mostRecentlyFocusedField)
|
||||
(initiallyFocusedField !== this.mostRecentlyFocusedField &&
|
||||
(await this.hideAutofillInlineMenuListOnFilledField(
|
||||
formFieldElement as FillableFormFieldElement,
|
||||
)))
|
||||
) {
|
||||
await this.sendExtensionMessage("closeAutofillInlineMenu", {
|
||||
overlayElement: AutofillOverlayElement.List,
|
||||
@@ -1035,6 +1037,7 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ
|
||||
formFieldElement.removeEventListener(EVENTS.KEYUP, this.handleFormFieldKeyupEvent);
|
||||
this.formFieldElements.delete(formFieldElement);
|
||||
});
|
||||
globalThis.removeEventListener(EVENTS.MESSAGE, this.handleWindowMessageEvent);
|
||||
globalThis.document.removeEventListener(
|
||||
EVENTS.VISIBILITYCHANGE,
|
||||
this.handleVisibilityChangeEvent,
|
||||
|
||||
Reference in New Issue
Block a user