mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
enhancement(web): disable background scroll when IRC fullscreen view is active (#1112)
* enhancement(web): disable background scroll when IRC fullscreen view is active * switch from add/remove to toggle. * add missing unmount
This commit is contained in:
parent
28b13d6d24
commit
80aa0b6331
1 changed files with 9 additions and 0 deletions
|
@ -676,6 +676,15 @@ export const Events = ({ network, channel }: EventsProps) => {
|
|||
setLogs([]);
|
||||
}, [settings.scrollOnNewLog]);
|
||||
|
||||
useEffect(() => {
|
||||
document.body.classList.toggle("overflow-hidden", isFullscreen);
|
||||
|
||||
return () => {
|
||||
// Clean up by removing the class when the component unmounts
|
||||
document.body.classList.remove("overflow-hidden");
|
||||
};
|
||||
}, [isFullscreen]);
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue