fix cleaning of text area
This commit is contained in:
parent
22f799770a
commit
c7dbf29078
4 changed files with 33 additions and 28 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue