summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-07-19 13:00:29 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-07-19 13:00:29 +0900
commitee5a06076228a65f69f357d0c3f5aa757201ed9f (patch)
tree9b2b82fa36ea83d423854a268bd205ac4d75e175 /src
parentClassic UI (diff)
downloadsharkey-ee5a06076228a65f69f357d0c3f5aa757201ed9f.tar.gz
sharkey-ee5a06076228a65f69f357d0c3f5aa757201ed9f.tar.bz2
sharkey-ee5a06076228a65f69f357d0c3f5aa757201ed9f.zip
Fix stickyTop calculation
Diffstat (limited to 'src')
-rw-r--r--src/client/directives/sticky-container.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/directives/sticky-container.ts b/src/client/directives/sticky-container.ts
index 60b442eba4..9610eba4da 100644
--- a/src/client/directives/sticky-container.ts
+++ b/src/client/directives/sticky-container.ts
@@ -6,7 +6,7 @@ export default {
const header = src.children[0];
const currentStickyTop = getComputedStyle(src).getPropertyValue('--stickyTop') || '0px';
- src.style.setProperty('--stickyTop', `${parseInt(currentStickyTop) + header.offsetHeight}px`);
+ src.style.setProperty('--stickyTop', `calc(${currentStickyTop} + ${header.offsetHeight}px)`);
header.style.setProperty('--stickyTop', currentStickyTop);
header.style.position = 'sticky';
header.style.top = 'var(--stickyTop)';