fix(hotkeys): restore Select Folder action and Alt+F/Esc shortcuts#22
Merged
Conversation
The Select Folder button and Alt+F shortcut stopped working due to a duplicate _selectFolder method and the default Electron menu swallowing Alt+F. - Rename the tree-row folder selector to _selectFolderRow to resolve the method-name collision that shadowed the folder-picker _selectFolder (button + Alt+F now reach the picker). - Remove the default Electron application menu (Menu.setApplicationMenu(null)) so the hidden menu bar no longer captures Alt / Alt+F mnemonics. - Move Alt+F (Select Folder) and Esc (Stop) handling before the typing-target guard so both work while the keyword/filter field has focus.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores the Select Folder action and the Alt+F / Esc keyboard shortcuts, which had stopped working.
Root causes & fixes
_selectFoldermethod — a later_selectFolder(folderRow)(tree-row selection) shadowed the folder-picker_selectFolder(), so the button and Alt+F hit the wrong method and did nothing. Renamed the tree-row version to_selectFolderRowand updated its 6 call sites.autoHideMenuBarthe default app menu still grabbed the Alt key / Alt+F mnemonic. AddedMenu.setApplicationMenu(null)so all Alt shortcuts reach the renderer.isTypingTargetearly-return. Moved both before the guard so they fire even when the keyword/filter field has focus.Files
src/main/main.js— remove default application menusrc/renderer/js/renderer.js— method rename + hotkey reorderingTesting