fix: emoji picker not scrollable on ios

This commit is contained in:
SukinoVERSΞ 2023-07-11 22:16:37 +07:00 committed by qbism
parent 0343cd8bd3
commit 182d619ca3

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