Skip to content

Commit

Permalink
fix(dropdown): round position offset values (#1201)
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and GitHub Enterprise committed May 28, 2024
1 parent f971fa6 commit 5e6bca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/ng-aquila/src/dropdown/dropdown-position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ export function getPositionOffset(dropdownElement: Element, formFieldElement: El
const formFieldRect = formFieldElement.getBoundingClientRect();
const dropdownRect = dropdownElement.getBoundingClientRect();
const panelHeaderPaddingTop = panelHeaderElement ? parseInt(getComputedStyle(panelHeaderElement).paddingTop, 10) : 0;
return formFieldRect.top - dropdownRect.top - panelHeaderPaddingTop;
return Math.round(formFieldRect.top) - Math.round(dropdownRect.top) - Math.round(panelHeaderPaddingTop);
}

0 comments on commit 5e6bca0

Please sign in to comment.