remove exit confirmation for mobile

This commit is contained in:
PhilReact 2024-09-22 15:16:36 +03:00
parent 06647d9318
commit 6eced23112

View File

@ -1039,10 +1039,11 @@ function App() {
// }, []) // }, [])
useEffect(() => { useEffect(() => {
if (!isMainWindow) return; if (!isMainWindow || isMobile) return;
const handleBeforeUnload = (e) => { const handleBeforeUnload = (e) => {
e.preventDefault(); e.preventDefault();
e.returnValue = ""; // This is required for Chrome to display the confirmation dialog. e.returnValue = ""; // This is required for Chrome to display the confirmation dialog.
return "";
}; };
// Add the event listener when the component mounts // Add the event listener when the component mounts