Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
Allow scroll on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
dzbo committed Nov 12, 2024
1 parent 8afb7e4 commit fa1ba96
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const {
isSearchOpen,
isModalOpen,
isWalletConnect,
isMobile,
} = storeToRefs(useAppStore())
const { addProviderEvents, removeProviderEvents } =
useBrowserExtensionProvider()
Expand Down Expand Up @@ -223,7 +224,7 @@ useHead({
const bodyClass = []
// prevent window scroll when search modal is open
if (isSearchOpen.value || isModalOpen.value) {
if (isSearchOpen.value || (!isMobile.value && isModalOpen.value)) {
bodyClass.push('!overflow-hidden')
}
Expand Down
1 change: 1 addition & 0 deletions components/AppModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ onUnmounted(() => {
>
<div
ref="modalContainer"
class="max-h-[calc(100vh-100px)]"
:class="{
'overflow-y-auto': modalHeight > screenHeight - 150,
}"
Expand Down

0 comments on commit fa1ba96

Please sign in to comment.