Merge branch 'master' of https://github.com/davidmonterocrespo24/velxio
commit
9da181a454
|
|
@ -22,5 +22,5 @@ body {
|
||||||
|
|
||||||
#root {
|
#root {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,19 @@ export const EditorPage: React.FC = () => {
|
||||||
return () => window.removeEventListener('keydown', handler);
|
return () => window.removeEventListener('keydown', handler);
|
||||||
}, [handleSaveClick]);
|
}, [handleSaveClick]);
|
||||||
|
|
||||||
|
// Prevent body scroll on the editor page
|
||||||
|
useEffect(() => {
|
||||||
|
const html = document.documentElement;
|
||||||
|
const body = document.body;
|
||||||
|
html.style.overflow = 'hidden';
|
||||||
|
body.style.overflow = 'hidden';
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
return () => {
|
||||||
|
html.style.overflow = '';
|
||||||
|
body.style.overflow = '';
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
const handleResizeMouseDown = useCallback((e: React.MouseEvent) => {
|
const handleResizeMouseDown = useCallback((e: React.MouseEvent) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
resizingRef.current = true;
|
resizingRef.current = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue