#3809 Add beforeunload event listener to prompt user when chat is saving
| @@ -12209,4 +12209,11 @@ jQuery(async function () { | ||
| 12209 | 12209 | }); |
| 12210 | 12210 | |
| 12211 | 12211 | initCustomSelectedSamplers(); |
| 12212 | + | |
| 12213 | + window.addEventListener('beforeunload', (e) => { | |
| 12214 | + if (isChatSaving) { | |
| 12215 | + e.preventDefault(); | |
| 12216 | + e.returnValue = true; | |
| 12217 | + } | |
| 12218 | + }); | |
| 12212 | 12219 | }); |