fixes change editor glitch
This commit is contained in:
@@ -51,6 +51,7 @@ angular.module('app.frontend')
|
||||
}.bind(this));
|
||||
|
||||
this.setNote = function(note, oldNote) {
|
||||
this.noteReady = false;
|
||||
var currentEditor = this.customEditor;
|
||||
this.customEditor = null;
|
||||
this.showExtensions = false;
|
||||
@@ -60,6 +61,7 @@ angular.module('app.frontend')
|
||||
var setEditor = function(editor) {
|
||||
this.customEditor = editor;
|
||||
this.postNoteToExternalEditor();
|
||||
this.noteReady = true;
|
||||
}.bind(this)
|
||||
|
||||
var editor = this.editorForNote(note);
|
||||
@@ -75,6 +77,7 @@ angular.module('app.frontend')
|
||||
}
|
||||
} else {
|
||||
this.customEditor = null;
|
||||
this.noteReady = true;
|
||||
}
|
||||
|
||||
if(note.safeText().length == 0 && note.dummy) {
|
||||
|
||||
@@ -5,6 +5,7 @@ $heading-height: 75px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: hidden;
|
||||
background-color: white;
|
||||
|
||||
&.fullscreen {
|
||||
width: 100%;
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
%span.sr-only
|
||||
%contextual-extensions-menu{"ng-if" => "ctrl.showExtensions", "item" => "ctrl.note"}
|
||||
|
||||
.editor-content{"ng-class" => "{'fullscreen' : ctrl.fullscreen }"}
|
||||
.editor-content{"ng-if" => "ctrl.noteReady", "ng-class" => "{'fullscreen' : ctrl.fullscreen }"}
|
||||
%iframe#editor-iframe{"ng-if" => "ctrl.customEditor", "ng-src" => "{{ctrl.customEditor.url | trusted}}", "frameBorder" => "0", "style" => "width: 100%;"}
|
||||
%textarea.editable#note-text-editor{"ng-if" => "!ctrl.customEditor", "ng-class" => "{'fullscreen' : ctrl.fullscreen }", "ng-model" => "ctrl.note.text",
|
||||
"ng-change" => "ctrl.contentChanged()", "ng-click" => "ctrl.clickedTextArea()", "ng-focus" => "ctrl.onContentFocus()"}
|
||||
|
||||
Reference in New Issue
Block a user