summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/filelist.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 9c749bb8f34..ab2601c5fb2 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -572,7 +572,8 @@ window.FileList = {
input.focus();
//preselect input
var len = input.val().lastIndexOf('.');
- if (len === -1) {
+ if ( len === -1 ||
+ tr.data('type') === 'dir' ) {
len = input.val().length;
}
input.selectRange(0, len);