|
|
|
@ -16,6 +16,7 @@ export class NormComponent extends EditorNodeContract implements OnInit {
|
|
|
|
|
protected savedValue = 'Click to edit...';
|
|
|
|
|
public contents = '';
|
|
|
|
|
private dirtyOverride = false;
|
|
|
|
|
protected hadOneFocusOut = false;
|
|
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
|
public readonly editorService: EditorService,
|
|
|
|
@ -55,7 +56,15 @@ export class NormComponent extends EditorNodeContract implements OnInit {
|
|
|
|
|
|
|
|
|
|
@HostListener('document:keyup.escape', ['$event'])
|
|
|
|
|
onFocusOut(event) {
|
|
|
|
|
if ( !this.hadOneFocusOut ) {
|
|
|
|
|
this.hadOneFocusOut = true;
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.hadOneFocusOut = false;
|
|
|
|
|
}, 500);
|
|
|
|
|
} else {
|
|
|
|
|
this.isFocused = false;
|
|
|
|
|
this.hadOneFocusOut = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
documentCommand(cmd: string) {
|
|
|
|
|