Skip to content

[CLOSED] Decrease Font Size keyboard shortcut throws error if command is disabled #2851

@core-ai-bot

Description

@core-ai-bot

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:

  1. Patch Brackets with the pull request at Persisting font size between Brackets Sessions adobe/brackets#3027 or just wait for the pull request to be merged (hopefully).
  2. Make sure all documents in the project are closed.
  3. Open the View Menu and observe that Increase Font Size, Decrease Font Size, and Restore Font Size commands are all disabled.
  4. Hit F12 to launch the Dev Tools and open the console.
  5. Press Ctrl-- (the shortcut key for Decrease Font Size command).

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions