Prevent horizontal scrollbar on viewport width increase

When increasing the window, the main reader container did not immediately reflect the change and was still smaller than the available width.
In case the viewed pages were filling the full width, this then caused the horizontal scrollbar to appear until the resize action was finished.
This commit is contained in:
schroda
2025-09-27 15:50:26 +02:00
parent d7690f9a36
commit 741426173a

View File

@@ -233,6 +233,8 @@ const BaseReader = ({
position: 'relative', position: 'relative',
display: 'flex', display: 'flex',
flexDirection: 'column', flexDirection: 'column',
minWidth: `calc(100vw - ${readerNavBarWidth}px)`,
maxWidth: `calc(100vw - ${readerNavBarWidth}px)`,
width: `calc(100vw - ${readerNavBarWidth}px)`, width: `calc(100vw - ${readerNavBarWidth}px)`,
height: `100vh`, height: `100vh`,
marginLeft: `${readerNavBarWidth}px`, marginLeft: `${readerNavBarWidth}px`,