summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorKevin Ndung'u <kevgathuku@gmail.com>2018-07-21 20:30:58 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-07-24 19:02:56 +0200
commit1cdf808197156b5389444db298f78c5255dd165c (patch)
tree409325540e69b213ffeaacab2d82991c6e400bea /apps
parentd06e00ffe3a6c0660107ce6f4a5766674640610f (diff)
downloadnextcloud-server-1cdf808197156b5389444db298f78c5255dd165c.tar.gz
nextcloud-server-1cdf808197156b5389444db298f78c5255dd165c.zip
Trigger upload actions only for Enter & Space keys
Signed-off-by: Kevin Ndung'u <kevgathuku@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/newfilemenu.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files/js/newfilemenu.js b/apps/files/js/newfilemenu.js
index 3581b2cd8fc..0ad7312c985 100644
--- a/apps/files/js/newfilemenu.js
+++ b/apps/files/js/newfilemenu.js
@@ -237,8 +237,10 @@
OC.Util.scaleFixForIE8(this.$('.svg'));
// Trigger upload action also with keyboard navigation on enter
- this.$el.find('[for="file_upload_start"]').on('keypress', function() {
- $('#file_upload_start').trigger('click');
+ this.$el.find('[for="file_upload_start"]').on('keyup', function(event) {
+ if (event.key === " " || event.key === "Enter") {
+ $('#file_upload_start').trigger('click');
+ }
});
},