fix: wrong position of UsageStatItem's popup (#1647)

* fix: wrong position of UsageStatItem's popup

* Replace TAB into Space for eslint

---------

Co-authored-by: Athurg Feng <athurg@gooth.org>
This commit is contained in:
Athurg Gooth
2023-05-12 22:07:53 +08:00
committed by GitHub
parent 5340008ad7
commit 218009a5ec

View File

@ -46,7 +46,8 @@ export const getElementBounding = (element: HTMLElement, relativeEl?: HTMLElemen
return false;
}
if (window.getComputedStyle(element).getPropertyValue("position") === "fixed") {
const position = window.getComputedStyle(element).getPropertyValue("position");
if (position === "fixed" || position === "static") {
return true;
}