Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Menu items that rely on focused editor should be disabled when not available #2064

Closed
jasonsanjose opened this issue Nov 6, 2012 · 3 comments
Assignees

Comments

@jasonsanjose
Copy link
Member

  1. Make a text selection in a file
  2. Click on the background of the working set (observe the editor selection color changes indicating that focus was lost)
  3. Choose Edit > Duplicate from the menu
  4. Observe no changes

Pull #2026 changes focusedEditorChange to activeEditorChange. We probably still want a focusedEditorChanged event to know when a blur event happens to CodeMirror. These menu items (probably the file and edit menus) would listen for this new event and disable/enable the commands as necessary.

@peterflynn
Copy link
Member

A corollary to this bug: clicking in dead zones like the working set bg shouldn't steal focus from the editor in the first place. It's inconsistent with how native apps work. I believe that's encompassed by the focus management story (which evolved from #1106).

If that's addressed, then this bug only occurs in cases where the focus is somewhere legit, e.g. the Find bar text field.

@njx
Copy link
Contributor

njx commented Nov 7, 2012

Reviewed. Marking low priority.

@jasonsanjose
Copy link
Member Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants