On escape, hide WYSIWYG toolbar
continuous-integration/drone/push Build is passing Details

master
Garrett Mills 4 years ago
parent b588865137
commit 0d329ac18a
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

@ -1,6 +1,5 @@
<div class="container" <div class="container"
(focusin)="onFocusIn($event)" (focusin)="onFocusIn($event)">
(focusout)="onFocusIn($event)">
<div class="toolbar-base" *ngIf="isFocused"> <div class="toolbar-base" *ngIf="isFocused">
<button class="toolbar-button" title="Bold" (click)="documentCommand('bold')"> <button class="toolbar-button" title="Bold" (click)="documentCommand('bold')">
<i class="icon fa fa-bold"></i> <i class="icon fa fa-bold"></i>

@ -53,7 +53,8 @@ export class NormComponent extends EditorNodeContract implements OnInit {
this.isFocused = true; this.isFocused = true;
} }
onFocusOut(event: MouseEvent) { @HostListener('document:keyup.escape', ['$event'])
onFocusOut(event) {
this.isFocused = false; this.isFocused = false;
} }

Loading…
Cancel
Save