Skip to content

Commit

Permalink
fix: Open inline menu on focus if filled field only if settings is
Browse files Browse the repository at this point in the history
corresponding

We customized the inline menu to open it on focus even if the field
is filled. But we want to have this behavior only if the inline menu
visibility is set to "On focus". If the inline menu visibility is set
to "On button click" we want to keep the classic behavior.
  • Loading branch information
zatteo committed Jan 13, 2025
1 parent c65628e commit 0f617c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/browser/src/autofill/background/overlay.background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2174,8 +2174,9 @@ export class OverlayBackground implements OverlayBackgroundInterface {
private async openInlineMenuOnFilledField(sender: chrome.runtime.MessageSender) {
// Cozy customization; open inline menu on focus if it is a contact or a paper even if filled field
if (
this.focusedFieldData.inlineMenuFillType === CipherType.Contact ||
this.focusedFieldData.inlineMenuFillType === CipherType.Paper
(this.focusedFieldData.inlineMenuFillType === CipherType.Contact ||
this.focusedFieldData.inlineMenuFillType === CipherType.Paper) &&
(await this.getInlineMenuVisibility()) === AutofillOverlayVisibility.OnFieldFocus
) {
await this.updateInlineMenuPosition(sender, AutofillOverlayElement.Button);
await this.updateInlineMenuPosition(sender, AutofillOverlayElement.List);
Expand Down

0 comments on commit 0f617c2

Please sign in to comment.