mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 23:16:15 +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
|
@ -553,6 +553,11 @@ function handleAnchorClick(event) {
|
||||||
const targetUrl = event.target.href;
|
const targetUrl = event.target.href;
|
||||||
|
|
||||||
const alertText = $("#update-canvas").attr("data-unsaved-work-text");
|
const alertText = $("#update-canvas").attr("data-unsaved-work-text");
|
||||||
|
if (!alertText) {
|
||||||
|
window.location.href = targetUrl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const exit = confirm(alertText);
|
const exit = confirm(alertText);
|
||||||
|
|
||||||
if (exit) {
|
if (exit) {
|
||||||
|
|
Loading…
Reference in a new issue