Skip to content

Commit

Permalink
Fix scroll bar shifting isssue
Browse files Browse the repository at this point in the history
  • Loading branch information
DemogorGod committed Sep 15, 2023
1 parent 72d3028 commit c976b48
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/web/src/layouts/default-layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ const handleOutsideClick = (event: any) => {
}
}
const doesScrollBarExist = ref(true)
onMounted(() => {
doesScrollBarExist.value = document.documentElement.scrollHeight > document.documentElement.clientHeight
window.addEventListener('click', handleOutsideClick)
})
Expand Down Expand Up @@ -249,7 +253,7 @@ onUnmounted(() =>{

<div
class="relative text-black"
:class="openWalletsModal? 'overflow-hidden pr-[15px]' : ''"
:class="openWalletsModal && doesScrollBarExist? 'overflow-hidden pr-[15px]' : ''"
>
<slot />
<div
Expand Down

0 comments on commit c976b48

Please sign in to comment.