-
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] Decrease Font Size keyboard shortcut throws error if command is disabled #2851
Comments
Comment by RaymondLim
|
Comment by WebsiteDeveloper for me on windows i get errors for all three shortcuts when no document is open and i found a quick fix for the errors because the Command execute function returns undefined if the Command is disabled i fixed this by adding return (new $.Deferred()).reject().promise() |
Comment by lkcampbell
I'm on Windows 7 and the problem does go away when I edit keyboard.json per your suggestion.
I'm not seeing the problem with the other shortcuts. |
Comment by RaymondLim
I don't see any issue with the other two as well.
I'm seeing a new issue after removing displayKey. Now Decrease font size is also showing its shortcut as Ctrl++ (same as Increase font size). So we have to fix the issue in native shell (at least on Windows). |
Comment by WebsiteDeveloper this is weird i merged you branch in the current master to test it and still get the errors i'll try to merge again to see if i made any merge errors or something like that |
Comment by WebsiteDeveloper it seems that i get this additional errors because of my german keyboard layout where i have 0 + - 2times, on the Num block they all throw an error, and the other ones only the Ctrl-- logs an error. |
Comment by RaymondLim
Nice discovery! I can reproduce it with numpad; so it has nothing to do with German keyboard layout. And your solution to fix it from CommandManager execute method is the right way to go. My suggestion of removing the displayKey won't fix the issue if the user uses keys from numpad. So please go ahead and fix it. I'll review your pull request when you submit it. |
Comment by RaymondLim FBNC to |
Comment by lkcampbell Confirmed fix. Thanks! |
Issue by lkcampbell
Sunday Mar 03, 2013 at 19:25 GMT
Originally opened as adobe/brackets#3030
Background:
I discovered this problem while working on another bug fix for adjusting font sizes. See the discussion at adobe/brackets#3027.
Repro Steps:
Observed Behavior:
A message is printed in the Dev Tools console: "Uncaught TypeError: Cannot call method 'state' of undefined."
Expected Behavior:
Nothing should happen. The shortcut keys for Increase Font Size (Ctrl-+) and Restore Font Size (Ctrl-0) do nothing. The shortcut key for Decrease Font Size shoud act the same.
The text was updated successfully, but these errors were encountered: