Merge pull request '[workaround] fix: emoji picker not scrollable on ios' (#323) from SukinoVerse/akkoma-fe:fix/emoji-picker-not-scrollable-ios into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Reviewed-on: #323
This commit is contained in:
floatingghost 2023-07-21 19:43:14 +00:00
commit 28bf597443

View file

@ -3,11 +3,13 @@ import * as bodyScrollLock from 'body-scroll-lock'
let previousNavPaddingRight
let previousAppBgWrapperRight
const lockerEls = new Set([])
const allowedScrollableClasses = ['emoji-tabs-item', 'emoji-item']
const disableBodyScroll = (el) => {
const scrollBarGap = window.innerWidth - document.documentElement.clientWidth
bodyScrollLock.disableBodyScroll(el, {
reserveScrollBarGap: true
reserveScrollBarGap: true,
allowTouchMove: el => allowedScrollableClasses.includes(el.parentElement.className),
})
lockerEls.add(el)
setTimeout(() => {