mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-09 18:19:10 +00:00
fix: emoji picker not scrollable on ios
This commit is contained in:
parent
42ffce97d6
commit
14ed359c33
1 changed files with 3 additions and 1 deletions
|
@ -3,11 +3,13 @@ import * as bodyScrollLock from 'body-scroll-lock'
|
||||||
let previousNavPaddingRight
|
let previousNavPaddingRight
|
||||||
let previousAppBgWrapperRight
|
let previousAppBgWrapperRight
|
||||||
const lockerEls = new Set([])
|
const lockerEls = new Set([])
|
||||||
|
const allowedScrollableClasses = ['emoji-tabs-item', 'emoji-item']
|
||||||
|
|
||||||
const disableBodyScroll = (el) => {
|
const disableBodyScroll = (el) => {
|
||||||
const scrollBarGap = window.innerWidth - document.documentElement.clientWidth
|
const scrollBarGap = window.innerWidth - document.documentElement.clientWidth
|
||||||
bodyScrollLock.disableBodyScroll(el, {
|
bodyScrollLock.disableBodyScroll(el, {
|
||||||
reserveScrollBarGap: true
|
reserveScrollBarGap: true,
|
||||||
|
allowTouchMove: el => allowedScrollableClasses.includes(el.parentElement.className),
|
||||||
})
|
})
|
||||||
lockerEls.add(el)
|
lockerEls.add(el)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
Loading…
Reference in a new issue