diff --git a/src/pages/Cutting.tsx b/src/pages/Cutting.tsx index 7316ec6..1217cb3 100644 --- a/src/pages/Cutting.tsx +++ b/src/pages/Cutting.tsx @@ -273,8 +273,13 @@ const Cutting = () => { } }; + const previousOverflow = document.body.style.overflow; + document.body.style.overflow = 'hidden'; document.addEventListener('keydown', closeOnEscape); - return () => document.removeEventListener('keydown', closeOnEscape); + return () => { + document.body.style.overflow = previousOverflow; + document.removeEventListener('keydown', closeOnEscape); + }; }, [isSettingsOpen]); const updateFamilyYield = (familyKey: CutFamilyKey, value: string) => { @@ -431,14 +436,14 @@ const Cutting = () => { {isSettingsOpen && (