mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-06 12:43:06 +08:00
Merge pull request #7314 from sboursen-scinote/sb_SCI-10457
Fix unsaved changes warning behavior on experiment canvas [SCI-10475]
This commit is contained in:
commit
f6aefd8f1d
1 changed files with 5 additions and 0 deletions
|
@ -553,6 +553,11 @@ function handleAnchorClick(event) {
|
|||
const targetUrl = event.target.href;
|
||||
|
||||
const alertText = $("#update-canvas").attr("data-unsaved-work-text");
|
||||
if (!alertText) {
|
||||
window.location.href = targetUrl;
|
||||
return;
|
||||
}
|
||||
|
||||
const exit = confirm(alertText);
|
||||
|
||||
if (exit) {
|
||||
|
|
Loading…
Reference in a new issue