-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CLOSED] File Rename should complete when clicking anywhere in project panel #3482
Comments
Comment by njx Reviewed. Marking medium priority and starter bug--seems like it should be straightforward to fix. |
Comment by vladnicula There are a few ways to fix this. I solved it by calling ProjectManager.forceFinishRename(); when clicking on #sidebar in SidebarView.js htmlReady callback. Another option is to look for the sidebar parent in ProjectManager.js. I'd like to make a pull request with this. Which approach should I take? :-? |
Comment by peterflynn
|
Comment by vladnicula
|
Comment by peterflynn
|
Comment by vladnicula
So instad of #sidebar it should document or maybe just body - not sure if it will make any difference-. Last question: Where would you add the |
Comment by JeffryBooher
|
Comment by vladnicula
|
Comment by JeffryBooher
|
Comment by JeffryBooher
|
Comment by vladnicula
|
Comment by lkcampbell
|
Comment by JeffryBooher
|
Comment by lkcampbell
Per your suggestions on the previous pull request, I put listeners on the main view click and the menu popup. Collapsing and expanding the panel appears to automatically finish the rename so I don't think the listener on the sidebar panelCollapsed is necessary. I did, however, have to put a listener on the sidebar panelResizeStart because clicking on the sidebar divider does not force the rename to finish. I tested a listener on the contextmenu per your suggested fix on issue #4693. It worked...sort of. The context menu appears and the rename is forced to finish, but then the file receives focus and the context menu suddenly disappears. In other words, it doesn't look very good. I'd like to play around with it a bit more to see if I can get it to behave better. Since issue #4693 is low priority and this issue is medium priority, I'm going to get this fix submitted now and look at issue #4693 separately later on. |
Comment by lkcampbell
An unexpected side effect I noticed today, using the shortcut key for any of the menu items activates the listener as well. So I cannot, for example, rename a file to highlight its name, then hit Ctrl-C to copy the file name. The rename is forced to end just before the text is copied. |
Comment by peterflynn
Note that the context menu doesn't actually have Copy/Paste items -- it's not possible to invoke Copy/Paste from HTML UI -- so there's less need to worry about being unable to access menu items. We definitely don't want to block keyboard shortcuts though. It sounds like there might be a brackets-shell bug in when |
Comment by peterflynn Oh, one other thought: it's probably useful to be able to resize the sidebar during a rename, in case you need more room to see the text field. I'm guessing Resizer does something on mousedown that causes you to never get a click event on it, so... I'm wondering if maybe listening for mousedown globally instead of click is safer. |
Comment by lkcampbell
Since a click to the main view is such a broad event, I am going to keep things as simple as possible while still addressing this bug. The only event I am keeping at this point is the main view mouse click. The context menu solution you suggested still is affected by issue #1910. The shortcut being blocked by Commands.APP_BEFORE_MENUPOPUP needs to filed but I need to get together a repro and don't have time presently to do that. Maybe I can get that done in a couple of days. Submitting an updated pull request now. |
Comment by lkcampbell
Any ideas on this or should I just describe the problem in general and forget about providing code demonstrating the problem? |
Comment by JeffryBooher FBNC |
Comment by lkcampbell Is it okay for me to confirm and close an issue when I created the fix? Or do you guys want someone else to confirm and close it? |
Comment by redmunds
|
Comment by lkcampbell Confirmed that it is fixed. |
Issue by lkcampbell
Sunday May 05, 2013 at 16:02 GMT
Originally opened as adobe/brackets#3720
OS: Windows 7
Build: sprint 24 development build 0.24.0-0 (master a9e27717f)
Repro Steps:
Observed Result:
Nothing happens. The rename edit box is still around the file name with the cursor blinking.
Expected Result:
The same result that occurs when I click on the working set, the project tree, or even the main editor window: the renaming completes and the rename file box goes away.
The text was updated successfully, but these errors were encountered: