From e404e5e2deb99f3057fe87d3c45cbf1986321a9f Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 14 Apr 2021 03:34:56 +0900 Subject: Tweak UI --- src/client/directives/sticky-container.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/directives') diff --git a/src/client/directives/sticky-container.ts b/src/client/directives/sticky-container.ts index db29ea64b7..60b442eba4 100644 --- a/src/client/directives/sticky-container.ts +++ b/src/client/directives/sticky-container.ts @@ -5,7 +5,7 @@ export default { //const query = binding.value; const header = src.children[0]; - const currentStickyTop = getComputedStyle(src).getPropertyValue('--stickyTop'); + const currentStickyTop = getComputedStyle(src).getPropertyValue('--stickyTop') || '0px'; src.style.setProperty('--stickyTop', `${parseInt(currentStickyTop) + header.offsetHeight}px`); header.style.setProperty('--stickyTop', currentStickyTop); header.style.position = 'sticky'; -- cgit v1.2.3-freya