summaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
authorAndrew Patton <andrew@acusti.ca>2014-07-25 17:51:18 -0400
committerAndrew Patton <andrew@acusti.ca>2014-07-25 17:51:18 -0400
commitef8eef75195205ed0db4f7582bbdbc045587f042 (patch)
treef2a6e8b697f4fbae2fd9ce36745e511400ce32ed /public/js
parent71cefc95ab60c8628af575df1e54d83bde46f73c (diff)
downloadgitea-ef8eef75195205ed0db4f7582bbdbc045587f042.tar.gz
gitea-ef8eef75195205ed0db4f7582bbdbc045587f042.zip
Trivial cleanup
using `event.preventDefault` instead of `return false` for being more explicit
Diffstat (limited to 'public/js')
-rw-r--r--public/js/app.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/public/js/app.js b/public/js/app.js
index 031c58245a..dba83f384c 100644
--- a/public/js/app.js
+++ b/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();
});
}());