1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-27 23:56:18 +00:00

[dir view] rename: fix

This commit is contained in:
llj
2017-04-22 16:30:58 +08:00
parent 6ea2858f64
commit 7c82cada60
3 changed files with 3 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ define([
var $input = this.$('[name="newname"]');
var dot_index = this.dirent.get('obj_name').lastIndexOf('.');
if (!this.dirent.get('is_dir') && dot_index != -1) {
$input[0].focus();
$input[0].setSelectionRange(0, dot_index);
} else {
$input.select();