Dont halt passive event
Some checks failed
Tests / tests (push) Has been cancelled

This commit is contained in:
Dustin Brett 2025-06-14 17:47:13 -07:00
parent 4312d31c7a
commit 49931ff0b3

View File

@ -4,7 +4,6 @@ import { type ComponentProcessProps } from "components/system/Apps/RenderCompone
import { useFileSystem } from "contexts/fileSystem";
import { useProcesses } from "contexts/process";
import { TRANSITIONS_IN_MILLISECONDS } from "utils/constants";
import { haltEvent } from "utils/functions";
const ONE_TIME_PASSIVE_CAPTURE_EVENT = {
capture: true,
@ -41,18 +40,13 @@ const ScreenSaver: FC<ComponentProcessProps> = ({ id }) => {
}),
[readFile, url]
);
const closeScreenSaver = useCallback(
(event?: Event) => {
if (event) haltEvent(event);
const closeScreenSaver = useCallback(() => {
if (iframeRef.current) {
iframeRef.current.style.display = "none";
}
if (iframeRef.current) {
iframeRef.current.style.display = "none";
}
close(id);
},
[close, id]
);
close(id);
}, [close, id]);
useEffect(() => {
if (url && !srcDoc[url]) loadScreenSaver();