From 39d938bb2aa6f7a42e9a2b12b8c20612e0199b3e Mon Sep 17 00:00:00 2001 From: Deepankar Bajpeyi Date: Tue, 5 Nov 2024 11:26:31 +0100 Subject: [PATCH] fix: remove offset --- .../src/features/autofill-password-import.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/injected/src/features/autofill-password-import.js b/injected/src/features/autofill-password-import.js index 3675c6d82..982922d12 100644 --- a/injected/src/features/autofill-password-import.js +++ b/injected/src/features/autofill-password-import.js @@ -30,8 +30,8 @@ export default class AutofillPasswordImport extends ContentFeature { }, zIndex: '984', borderRadius: '100%', - offsetLeft: 0.03, - offsetTop: 0.03 + offsetLeftEm: 0.02, + offsetTopEm: 0 } } @@ -46,8 +46,8 @@ export default class AutofillPasswordImport extends ContentFeature { }, zIndex: '984', borderRadius: '100%', - offsetLeft: 0, - offsetTop: 0 + offsetLeftEm: 0, + offsetTopEm: 0 } } @@ -62,8 +62,8 @@ export default class AutofillPasswordImport extends ContentFeature { }, zIndex: '999', borderRadius: '2px', - offsetLeft: 0.08, - offsetTop: 0.05 + offsetLeftEm: 0, + offsetTopEm: -0.05 } } @@ -139,8 +139,8 @@ export default class AutofillPasswordImport extends ContentFeature { const { top, left, width, height } = elementToCenterOn.getBoundingClientRect() overlay.style.position = 'absolute' - overlay.style.top = `calc(${top}px + ${window.scrollY}px - ${isRound ? height / 2 : 0}px - 1px - ${style.offsetTop}em)` - overlay.style.left = `calc(${left}px + ${window.scrollX}px - ${isRound ? width / 2 : 0}px - 1px - ${style.offsetLeft}em)` + overlay.style.top = `calc(${top}px + ${window.scrollY}px - ${isRound ? height / 2 : 0}px - 1px - ${style.offsetTopEm}em)` + overlay.style.left = `calc(${left}px + ${window.scrollX}px - ${isRound ? width / 2 : 0}px - 1px - ${style.offsetLeftEm}em)` const mainElementRect = mainElement.getBoundingClientRect() overlay.style.width = `${mainElementRect.width}px`