浏览代码

Trivial cleanup

using `event.preventDefault` instead of `return false` for being more
explicit
Andrew Patton 10 年之前
父节点
当前提交
ef8eef7519
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      public/js/app.js

+ 3 - 3
public/js/app.js

@@ -726,7 +726,7 @@ function initIssue() {
             return false;
         });
 
-        fileInput.addEventListener("change", function(event) {
+        fileInput.addEventListener("change", function() {
             for (var index = 0; index < fileInput.files.length; index++) {
                 var file = fileInput.files[index];
 
@@ -752,9 +752,9 @@ function initIssue() {
             this.value = "";
         });
 
-        $addButton.on("click", function() {
+        $addButton.on("click", function(evt) {
             fileInput.click();
-            return false;
+            evt.preventDefault();
         });
     }());