mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
[PM-5189] Fixing issue found in Safari with how the inline menu is re-positioned
This commit is contained in:
@@ -1133,10 +1133,14 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ
|
||||
*/
|
||||
private isFocusedFieldWithinViewportBounds() {
|
||||
const focusedFieldRectsTop = this.focusedFieldData?.focusedFieldRects?.top;
|
||||
const focusedFieldRectsBottom =
|
||||
focusedFieldRectsTop + this.focusedFieldData?.focusedFieldRects?.height;
|
||||
const viewportHeight = globalThis.innerHeight + globalThis.scrollY;
|
||||
return (
|
||||
focusedFieldRectsTop &&
|
||||
focusedFieldRectsTop > 0 &&
|
||||
focusedFieldRectsTop < globalThis.innerHeight + globalThis.scrollY
|
||||
focusedFieldRectsTop < viewportHeight &&
|
||||
focusedFieldRectsBottom < viewportHeight
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user