always handle body scroll on mobile

This commit is contained in:
Joffrey JAFFEUX 2024-12-12 13:57:07 +01:00 committed by Penar Musaraj
parent 6236dfb9d2
commit a28c825147
1 changed files with 0 additions and 10 deletions

View File

@ -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 () => {