summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/filelist.js2
-rw-r--r--apps/files/js/newfilemenu.js9
2 files changed, 9 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index fd20ebe8321..f44a36435a1 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -678,7 +678,7 @@
this.updateSelectionSummary();
} else {
// clicked directly on the name
- if (!this._detailsView || $(event.target).is('.nametext') || $(event.target).closest('.nametext').length) {
+ if (!this._detailsView || $(event.target).is('.nametext, .name') || $(event.target).closest('.nametext').length) {
var filename = $tr.attr('data-file');
var renaming = $tr.data('renaming');
if (!renaming) {
diff --git a/apps/files/js/newfilemenu.js b/apps/files/js/newfilemenu.js
index a340b8b6218..0ad7312c985 100644
--- a/apps/files/js/newfilemenu.js
+++ b/apps/files/js/newfilemenu.js
@@ -15,7 +15,7 @@
var TEMPLATE_MENU =
'<ul>' +
'<li>' +
- '<label for="file_upload_start" class="menuitem" data-action="upload" title="{{uploadMaxHumanFilesize}}"><span class="svg icon icon-upload"></span><span class="displayname">{{uploadLabel}}</span></label>' +
+ '<label for="file_upload_start" class="menuitem" data-action="upload" title="{{uploadMaxHumanFilesize}}" tabindex="0"><span class="svg icon icon-upload"></span><span class="displayname">{{uploadLabel}}</span></label>' +
'</li>' +
'{{#each items}}' +
'<li>' +
@@ -235,6 +235,13 @@
items: this._menuItems
}));
OC.Util.scaleFixForIE8(this.$('.svg'));
+
+ // Trigger upload action also with keyboard navigation on enter
+ this.$el.find('[for="file_upload_start"]').on('keyup', function(event) {
+ if (event.key === " " || event.key === "Enter") {
+ $('#file_upload_start').trigger('click');
+ }
+ });
},
/**