-
Notifications
You must be signed in to change notification settings - Fork 7.6k
F5 sometimes triggers wrong menu item (after run unit tests?) #3037
Comments
Hmm, this might be UTR. It seemed I was in a weird state where shortcuts from most extensions (including DebugCommands) weren't working right. After restarting Brackets I can't repro this anymore. (And Brackets was definitely in a bad state because on quit, the second .exe hung around stuck at max CPU until I killed it). Is there anything suspicious in the native shortcut handling code that could cause something like this? |
Reviewed. Closing as UTR for now, can reopen if seen again. But @gruehle, we're curious if this rings any bells at a glance? |
Doesn't ring a bell. We do have different internal mapping tables for command->tag and tag->item, so there is a possibility that somehow one of the maps got confused. We should keep an eye out for reproducible steps. |
@gruehle I got in a similar state today, where pressing F5 did nothing but other shortcuts seemed to work fine. I put a breakpoint in ShellAPI.executeCommand() and see that it's getting called with Btw, I had run unit tests at least once in this session of the .exe -- could the issue be related to menu state leaking between different windows? |
Unlike the original report, if I "soft" reload via clicking the menu or hitting F5 in dev tools the bug persists. Same bad command ID as before. Only quitting the whole process fixes it -- so it's definitely something in the native shell state. |
Also, fwiw -- with the set of extensions I have enabled there are exactly 24 menu dividers, so divider index 23 would be the very last divider in the whole menu structure. |
When reloading, were you running code that changed the menu structure at all (eg adding/removing an extension that adds a menu item, or editing DefaultMenus.js)? |
I don't think I had touched any menu-related code. But I did run unit tests, including tests that spawn other Brackets windows. I think unit tests disable user extension loading, which means those windows would have had a different menu item set from the main window (and of course the Jasmine window has different menus too). |
I suspect this was finally fixed for real by all the menubar work leading up to PR #5078 |
Result: a new Brackets window is opened. Brackets doesn't reload.
Expected: F5 is still listed next to the "Reload" menu item...
If you click the Reload menu item, it works fine. After that, F5 will work correctly until the next time you trigger New Brackets Window.
The text was updated successfully, but these errors were encountered: