fix: emoji picker not scrollable on ios
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
SukinoVERSΞ 2023-07-11 22:16:37 +07:00
parent 42ffce97d6
commit 14ed359c33

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(() => {