From fb57006b0d7ad18e3874b581a55899d847114796 Mon Sep 17 00:00:00 2001 From: Valentin Kaelin Date: Wed, 22 Apr 2020 23:44:38 +0200 Subject: [PATCH] fix: sidebar glitch effect with Firefox --- client/src/views/Summoner.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/views/Summoner.vue b/client/src/views/Summoner.vue index c304b9a..18609bd 100644 --- a/client/src/views/Summoner.vue +++ b/client/src/views/Summoner.vue @@ -108,7 +108,7 @@ export default { if (this.isMobile) return this.$nextTick(() => { - this.sidebarRectangle.height = this.$refs.sidebar ? this.$refs.sidebar.getBoundingClientRect().height : null + this.sidebarRectangle.height = this.$refs.sidebar ? Math.ceil(this.$refs.sidebar.getBoundingClientRect().height) : null this.isSidebarFixed() }) }, @@ -124,8 +124,8 @@ export default { }, isSidebarFixed() { if (this.isMobile) return - if (!this.sidebarRectangle.height) return + this.fixedSidebar = window.innerHeight + document.documentElement.scrollTop > this.sidebarRectangle.y + this.sidebarRectangle.height + 123 }, ...mapActions('summoner', ['moreMatches', 'overviewRequest']),