-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Fix #2641: Input field change to blank after double click F2 to rename the file - few user will encounter #3299
Conversation
|
Assigned @gruehle |
|
Would it be better to just check |
|
I didn't saw that function before. It should work to fix this too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go at the top of the function, before the call to showInTree(). There is no real harm in calling showInTree(), but it is not necessary since the item will be visible if it is being renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
|
Initial review complete. It works as advertised, but the |
src/project/ProjectManager.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The _isInRename() function is expecting a DOM element, but entry is a FileEntry. You'll need to get the selected DOM element here.
It may just be easiest to put the code back where it was... Sorry about that! :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. It's ok. I did a fast test and it worked, so I submitted the change, but I might have been using the old version even after reloading the second window.
|
Thanks! Merging. |
Fix #2641: Input field change to blank after double click F2 to rename the file - few user will encounter
This adds a renaming flag, so that when F2 is pressed for the second time, the code does nothing, leaving the renaming as it was, which fixes issue #2641.