mirror of https://github.com/jetkvm/kvm.git
fix: add delay before page reload to ensure smooth navigation during redirection
This commit is contained in:
parent
e708ee39f5
commit
85f5edbd3c
|
|
@ -485,6 +485,7 @@ export function RebootingOverlay({ show, postRebootAction }: RebootingOverlayPro
|
|||
clearInterval(intervalId); // Stop polling before redirect
|
||||
|
||||
window.location.href = targetUrl.href;
|
||||
// Add 1s delay between setting location.href and calling reload() to prevent reload from interrupting the navigation.
|
||||
await sleep(1000);
|
||||
window.location.reload();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue