diff --git a/src/app/editor.coffee b/src/app/editor.coffee index 7d6dcb054..83ebbbd6c 100644 --- a/src/app/editor.coffee +++ b/src/app/editor.coffee @@ -351,10 +351,12 @@ class Editor extends View @hiddenInput.on 'focus', => @rootView()?.editorFocused(this) @isFocused = true + @removeClass 'is-blurred' @hiddenInput.on 'focusout', => @isFocused = false @autosave() if config.get "editor.autosave" + @addClass 'is-blurred' @underlayer.on 'click', (e) => return unless e.target is @underlayer[0] diff --git a/static/editor.css b/static/editor.css index 4c7eac274..86b463bda 100644 --- a/static/editor.css +++ b/static/editor.css @@ -76,6 +76,10 @@ opacity: 1; } +.editor.is-blurred .line.cursor-line { + opacity: 0; +} + .editor .invisible { opacity: 0.2; } @@ -156,3 +160,7 @@ pointer-events: none; z-index: -1; } + +.editor.is-blurred .selection .region { + opacity: 0; +}