fix cleaning of text area

This commit is contained in:
ReznoRMichael 2021-07-20 15:15:29 +02:00
commit c7dbf29078
4 changed files with 33 additions and 28 deletions

View file

@ -1706,12 +1706,6 @@ function HKReadTextArea(textAreaId = "") {
*/
function InitializeHTMLPopulation(db) {
/* Clean the text area and file input from leftover save file if present (Firefox especially) */
(async () => {
document.getElementById("save-area").value = "";
document.getElementById("save-area-file").value = "";
})();
GenerateInnerHTML(db);
// Check local storage first to set proper checkbox state before the below functions start (default is always unchecked)

View file

@ -1127,6 +1127,15 @@ document.getElementById("save-area-file").addEventListener("change", (event) =>
}
});
/* Clean the text area and file input from leftover save file if present (Firefox especially) */
document.addEventListener("DOMContentLoaded", () => {
(async () => {
document.getElementById("save-area").value = "";
document.getElementById("save-area-file").value = "";
})();
});
/* ------------------------- Exports ------------------------------- */
export {