app/assets/build/coco/app.js in coveragebook_components-0.8.4 vs app/assets/build/coco/app.js in coveragebook_components-0.8.5

- old
+ new

@@ -14042,11 +14042,11 @@ // ../../../package.json var package_default = { name: "coveragebook-components", type: "module", - version: "0.8.4", + version: "0.8.5", main: "index.js", repository: "git@github.com:coveragebook/coco.git", author: "Mark Perkins <mark@coveragebook.com>", license: "NO LICENSE", browserslist: [ @@ -24141,10 +24141,11 @@ openPicker() { this.input.click(); }, clear() { this.file = null; + this.input.value = null; this.$dispatch("image-uploader:clear"); }, handleDrop(event) { const files = event.detail.files || event.dataTransfer.files; this.handleFiles(files); @@ -24635,19 +24636,17 @@ this.$watch( name, (value, oldValue) => this.history.add(name, value, oldValue) ); }); + this.$watch("history.undoable", (undoable) => { + if (undoable) { + window.onbeforeunload = () => true; + } else { + window.onbeforeunload = null; + } + }); this.ready = true; - }); - this.$watch("history.undoable", (undoable) => { - if (undoable) { - window.onbeforeunload = () => { - return true; - }; - } else { - window.onbeforeunload = null; - } }); }, undo(name, value) { this[name] = value; this.$nextTick(() => this.updateTextareaSizes());