From 218009a5ec2a9c7c2c12da49fe0f304ef7a1e9ec Mon Sep 17 00:00:00 2001 From: Athurg Gooth Date: Fri, 12 May 2023 22:07:53 +0800 Subject: [PATCH] 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 --- web/src/helpers/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/helpers/utils.ts b/web/src/helpers/utils.ts index ff2b3d31..629ea0f9 100644 --- a/web/src/helpers/utils.ts +++ b/web/src/helpers/utils.ts @@ -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; }