vue-final / vue-final-modal

🍕Vue Final Modal is a tiny, renderless, mobile-friendly, feature-rich modal component for Vue.js.
https://vue-final-modal.org
MIT License
862 stars 95 forks source link

Fix horizontal scroll in child element on IOS #434

Open AdamMerrifield opened 4 months ago

AdamMerrifield commented 4 months ago

With the current implementation of useLockScroll child elements with overflow-x of 'auto' | 'scroll' on IOS are prevented and scrolling in these panels do not function well. I only found this as an issue with IOS. The modifications here will check for both X and Y overflow on the parent elements of the event target.

You can see an example on an IOS device here https://stackblitz.com/edit/github-s2cpc5?file=src%2Fcomponents%2FMyModal.vue

based on https://github.com/willmcpo/body-scroll-lock/pull/133