Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit c449c12

Browse files
committed
Merge pull request #3299 from TomMalbran/tom/fix-issue-2641
Fix #2641: Input field change to blank after double click F2 to rename the file - few user will encounter
2 parents 26e9c90 + bc946e1 commit c449c12

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/project/ProjectManager.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ define(function (require, exports, module) {
125125
* @ see getBaseUrl(), setBaseUrl()
126126
*/
127127
var _projectBaseUrl = "";
128-
128+
129129
/**
130130
* @private
131131
* @type {PreferenceStorage}
@@ -1305,6 +1305,11 @@ define(function (require, exports, module) {
13051305
// First make sure the item in the tree is visible - jsTree's rename API doesn't do anything to ensure inline input is visible
13061306
showInTree(entry)
13071307
.done(function (selected) {
1308+
// Don't try to rename again if we are already renaming
1309+
if (_isInRename(selected)) {
1310+
return;
1311+
}
1312+
13081313
var isFolder = selected.hasClass("jstree-open") || selected.hasClass("jstree-closed");
13091314

13101315
_projectTree.one("rename.jstree", function (event, data) {

0 commit comments

Comments
 (0)