Disable scroll outside of a child node
npm install vue-remove-scroll``bash`
npm i vue-remove-scroll
`js
import { useRemoveScroll } from 'vue-remove-scroll'
const { enableScroll, disableScroll } = useRemoveScroll()
`
`js
import { useRemoveScroll } from 'vue-remove-scroll'
import { ref } from 'vue'
const modal = ref(null)
const { enableScroll, disableScroll } = useRemoveScroll({
excludedElements: [modal.value]
})
``
This project is based on and contains code from:
This project is licensed under the MIT License.