mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
[PM-5189] Fixing issue found in Safari with how the inline menu is re-positioned
This commit is contained in:
parent
ee8b179b6c
commit
22299ce4fb
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user