mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[PM-5189] Adjusting how we handle fade out of the inline menu element
This commit is contained in:
@@ -17,7 +17,8 @@ export class AutofillInlineMenuIframeService implements AutofillInlineMenuIframe
|
||||
private ariaAlertElement: HTMLDivElement;
|
||||
private ariaAlertTimeout: number | NodeJS.Timeout;
|
||||
private delayedCloseTimeout: number | NodeJS.Timeout;
|
||||
private readonly defaultOpacityTransition = "opacity 125ms ease-out 0s";
|
||||
private readonly fadeInOpacityTransition = "opacity 125ms ease-out 0s";
|
||||
private readonly fadeOutOpacityTransition = "opacity 75ms ease-in 0s";
|
||||
private iframeStyles: Partial<CSSStyleDeclaration> = {
|
||||
all: "initial",
|
||||
position: "fixed",
|
||||
@@ -25,7 +26,7 @@ export class AutofillInlineMenuIframeService implements AutofillInlineMenuIframe
|
||||
zIndex: "2147483647",
|
||||
lineHeight: "0",
|
||||
overflow: "hidden",
|
||||
transition: this.defaultOpacityTransition,
|
||||
transition: this.fadeInOpacityTransition,
|
||||
visibility: "visible",
|
||||
clipPath: "none",
|
||||
pointerEvents: "auto",
|
||||
@@ -412,10 +413,13 @@ export class AutofillInlineMenuIframeService implements AutofillInlineMenuIframe
|
||||
clearTimeout(this.delayedCloseTimeout);
|
||||
}
|
||||
|
||||
this.updateElementStyles(this.iframe, { opacity: "0", transition: "none" });
|
||||
this.updateElementStyles(this.iframe, {
|
||||
transition: this.fadeOutOpacityTransition,
|
||||
opacity: "0",
|
||||
});
|
||||
|
||||
this.delayedCloseTimeout = globalThis.setTimeout(() => {
|
||||
this.updateElementStyles(this.iframe, { transition: this.defaultOpacityTransition });
|
||||
this.updateElementStyles(this.iframe, { transition: this.fadeInOpacityTransition });
|
||||
this.forceCloseAutofillInlineMenu();
|
||||
}, 100);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user