diff options
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r-- | apps/files/js/filelist.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index b1e9a885063..c24d1fd8244 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -191,6 +191,13 @@ var FileList={ td.children('a.name').hide(); td.append(form); input.focus(); + //preselect input + var len = input.val().lastIndexOf('.'); + if (len === -1) { + len = input.val().length; + } + input.selectRange(0,len); + form.submit(function(event){ event.stopPropagation(); event.preventDefault(); |