-
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] Working set context menu pops closed when right-clicking file that hasn't been opened yet #1859
Comments
Comment by peterflynn This also happens when right-clicking files in the project tree (if they are not open in an editor, i.e. not in the working set and not currently selected). |
Comment by RaymondLim I can't reproduce it on Win7. So must be a mac only issue. |
Comment by peterflynn I can repro on WinXP. I'm guessing it depends on how quickly the file is opened (try with a larger file, perhaps, if you're on a faster system?). |
Comment by pthiess Reviewed might be related to the popup management bug #1381. In Trello Card 643, closing. |
Comment by pthiess Re-opend since we want to keep issues visible if not ECR. |
Comment by peterflynn So here's how the bug plays out:
In scenarios where the disk is fast or the file was already loaded, currentDocumentChange occurs before mouseup and thus the context menu opens after closeAll(). Seems like ths ideal fix is, don't fake a scroll event to trigger updating the triangle position. Barring that, we could detect fake scroll events and only call closeAll() when a real user-driven scroll has occurred. |
Comment by peterflynn Actually, there's a subtler bug here too: in the interval where the context menu has been opened but the document isn't yet loaded, the tree selection still lies on the old item. This means that if you manage to click a context menu command during that time, it will actually apply to the wrong file. Probably near-impossible with our current local-disk APIs, but in browser with a network backend this could be a real problem. Along with many other similar bugs we have lurking -- so we should probably just spin that off as a separate issue. |
Comment by njx Bumping to medium priority since a number of people have run into it. I think we have too many bugs open for sprint 27 already, but should consider it for the next sprint. |
Comment by lkcampbell I did a little bit of research on this bug today. Just as a test, I commented out the fake scroll event in ProjectManager._redraw(). It does get rid of those three Menus.closeAll() calls that come from the triggered fake scroll events, as The last call is coming from Editor.js. It is an anonymous function that fires on the CodeMirror scroll event. I assume the Editor is scrolling somehow as the new document is loaded. So, this needs to be addressed as well. |
Comment by njx The "always close popups on scroll" behavior also causes #3391. I wonder if we need a smarter heuristic here, but I'm not sure what it would be. At the very least, scrolls in one area shouldn't affect popups that are associated with completely different areas of the UI. But even within a given area the existing behavior is problematic because the scrolls are happening asynchronously after the popup appears. |
Comment by lkcampbell
If you have any ideas or suggestions for possible solutions, I would welcome them as well. |
Comment by njx
|
Comment by lkcampbell
|
Comment by lkcampbell Also, the problem I was seeing, where the anonymous function in Editor.js is sending a scroll event that closes all menus, seems to occur much less frequently now. I have a difficult time reproducing it whereas, when I originally documented that observation, it happened almost every time I opened a new document. I think the problem of a broad-based closing of popups needs to still be address, as |
Comment by jasonsanjose FBNC |
Comment by lkcampbell
|
Comment by peterflynn Hmm, I got one case where the menu simply didn't appear at all, but I haven't been able to reproduce it. Seems fixed in general. I'll file a new bug if I can find reliable steps for that one glitch. |
Comment by lkcampbell
|
Issue by peterflynn
Monday Oct 22, 2012 at 05:34 GMT
Originally opened as adobe/brackets#1910
Result:
Context menu appears briefly, then closes again.
Expected:
Context menu stays open.
Workaround:
Right-click it again.
The text was updated successfully, but these errors were encountered: