use is-focused for the editor because it needs it's own state independent of the window state

This commit is contained in:
Justin Palmer
2013-02-04 16:42:46 -08:00
parent aa95590e6c
commit 022b5fb88c
2 changed files with 9 additions and 9 deletions

View File

@@ -351,12 +351,12 @@ class Editor extends View
@hiddenInput.on 'focus', =>
@rootView()?.editorFocused(this)
@isFocused = true
@removeClass 'is-blurred'
@addClass 'is-focused'
@hiddenInput.on 'focusout', =>
@isFocused = false
@autosave() if config.get "editor.autosave"
@addClass 'is-blurred'
@removeClass 'is-focused'
@underlayer.on 'click', (e) =>
return unless e.target is @underlayer[0]