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

Conversation

@TomMalbran
Copy link
Contributor

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.

@ghost ghost assigned njx and gruehle Apr 1, 2013
@julianasuh
Copy link
Contributor

Assigned @gruehle

@peterflynn
Copy link
Member

Would it be better to just check ProjectManager._isInRename()?

@TomMalbran
Copy link
Contributor Author

I didn't saw that function before. It should work to fix this too.

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@gruehle
Copy link
Member

gruehle commented Apr 23, 2013

Initial review complete. It works as advertised, but the _isInRename() check could be done earlier.

Copy link
Member

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! :-)

Copy link
Contributor Author

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.

@gruehle
Copy link
Member

gruehle commented Apr 24, 2013

Thanks! Merging.

gruehle added a commit that referenced this pull request Apr 24, 2013
Fix #2641: Input field change to blank after double click F2 to rename the file - few user will encounter
@gruehle gruehle merged commit c449c12 into adobe:master Apr 24, 2013
@TomMalbran TomMalbran deleted the tom/fix-issue-2641 branch July 23, 2013 08:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants