From a28c825147df5366112780cebeb2ba80da739151 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 12 Dec 2024 13:57:07 +0100 Subject: [PATCH] always handle body scroll on mobile --- .../components/select-kit/select-kit-collection.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/app/assets/javascripts/select-kit/addon/components/select-kit/select-kit-collection.js b/app/assets/javascripts/select-kit/addon/components/select-kit/select-kit-collection.js index 232ba39d9cf..b4c012e646c 100644 --- a/app/assets/javascripts/select-kit/addon/components/select-kit/select-kit-collection.js +++ b/app/assets/javascripts/select-kit/addon/components/select-kit/select-kit-collection.js @@ -16,16 +16,6 @@ export default class SelectKitCollection extends Component { return; } - // when opened a modal will disable all scroll but itself - // this code is whitelisting the collection to ensure it can be scrolled in this case - // however we only want to do this if the modal is open to avoid breaking the scroll on the page - // eg: opening a combobox under a topic shouldn't prevent you to scroll the topic page - const isModalOpen = - document.documentElement.classList.contains("modal-open"); - if (!isModalOpen) { - return; - } - disableBodyScroll(element); return () => {