On escape, hide WYSIWYG toolbar
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Garrett Mills 2020-10-16 12:23:34 -05:00
parent b588865137
commit 0d329ac18a
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246
2 changed files with 3 additions and 3 deletions

View File

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

View File

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