mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-03-28 08:15:55 +00:00
remove exit confirmation for mobile
This commit is contained in:
parent
06647d9318
commit
6eced23112
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user