From 93aa4c66203e789698a18ecc6dc5db71d77967e3 Mon Sep 17 00:00:00 2001 From: wychoong <67364036+wychoong@users.noreply.github.com> Date: Tue, 30 Jul 2024 23:45:51 +0800 Subject: [PATCH] cleanup --- package.json | 1 - packages/support/resources/js/index.js | 7 ------- .../resources/views/components/modal/index.blade.php | 11 ----------- 3 files changed, 19 deletions(-) diff --git a/package.json b/package.json index 3d05221ce6..6640c2c99b 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "alpinejs": "^3.10.4", "async-alpine": "v1.2.1", "autoprefixer": "^10.4.0", - "body-scroll-lock": "^4.0.0-beta.0", "chart.js": "^3.6.0", "chartjs-adapter-luxon": "^1.3.1", "choices.js": "^10.1.0", diff --git a/packages/support/resources/js/index.js b/packages/support/resources/js/index.js index 3a1397a11e..d29ca97c64 100644 --- a/packages/support/resources/js/index.js +++ b/packages/support/resources/js/index.js @@ -1,6 +1,5 @@ import AlpineFloatingUI from '@awcodes/alpine-floating-ui' import AlpineLazyLoadAssets from 'alpine-lazy-load-assets' -// import { clearAllBodyScrollLocks, disableBodyScroll } from 'body-scroll-lock' import { md5 } from 'js-md5' import Sortable from './sortable' import Tooltip from '@ryangjchandler/alpine-tooltip' @@ -17,10 +16,6 @@ document.addEventListener('alpine:init', () => { window.Alpine.plugin(Tooltip) }) -// document.addEventListener('livewire:navigating', () => { -// clearAllBodyScrollLocks() -// }) - // https://github.com/laravel/framework/blob/5299c22321c0f1ea8ff770b84a6c6469c4d6edec/src/Illuminate/Translation/MessageSelector.php#L15 const pluralize = function (text, number, variables) { function extract(segments, number) { @@ -110,7 +105,5 @@ const pluralize = function (text, number, variables) { ) } -// window.clearAllBodyScrollLocks = clearAllBodyScrollLocks -// window.disableBodyScroll = disableBodyScroll window.jsMd5 = md5 window.pluralize = pluralize diff --git a/packages/support/resources/views/components/modal/index.blade.php b/packages/support/resources/views/components/modal/index.blade.php index 2339195f98..4e0ad70453 100644 --- a/packages/support/resources/views/components/modal/index.blade.php +++ b/packages/support/resources/views/components/modal/index.blade.php @@ -71,14 +71,6 @@ this.$refs.modalContainer.dispatchEvent( new CustomEvent('modal-closed', { id: '{{ $id }}' }), ) - - {{-- this.$nextTick(() => { - if (document.getElementsByClassName('fi-modal-open').length) { - return - } - - window.clearAllBodyScrollLocks() - }) --}} }, open: function () { @@ -89,9 +81,6 @@ new CustomEvent('modal-opened', { id: '{{ $id }}' }), ) }) - - {{-- window.clearAllBodyScrollLocks() - window.disableBodyScroll(this.$root) --}} }, }" @if ($id)