From 795969842c2305bf5ba7dba382f2cda16f290202 Mon Sep 17 00:00:00 2001 From: cpsdqs Date: Tue, 3 Oct 2017 10:30:11 +0200 Subject: [PATCH] Fix upload buttons not canceling events --- js/term/upload.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/term/upload.js b/js/term/upload.js index 68ea32c..226826e 100644 --- a/js/term/upload.js +++ b/js/term/upload.js @@ -159,19 +159,19 @@ module.exports = function (conn, input, screen) { reader.readAsText(file) }, false) - qs('#term-fu-open').addEventListener('click', function () { + qs('#term-fu-open').addEventListener('click', e => { + e.preventDefault() openUploadDialog() - return false }) - qs('#term-fu-start').addEventListener('click', function () { + qs('#term-fu-start').addEventListener('click', e => { + e.preventDefault() startUpload() - return false }) - qs('#term-fu-close').addEventListener('click', function () { + qs('#term-fu-close').addEventListener('click', e => { + e.preventDefault() fuClose() - return false }) }, open: openUploadDialog,