Save editable toolbars when clicking outside

pull/7116/head
Henriette Dinger 6 years ago
parent 7751de777d
commit 8111bbbb31
  1. 4
      frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.component.ts
  2. 2
      frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.html

@ -110,8 +110,8 @@ export class EditableToolbarTitleComponent implements OnInit, OnChanges {
(event.target as HTMLInputElement).select();
}
public resetWhenFocusOutside($event:FocusEvent) {
ContainHelpers.whenOutside(this.elementRef.nativeElement, () => this.reset());
public saveWhenFocusOutside($event:FocusEvent) {
ContainHelpers.whenOutside(this.elementRef.nativeElement, () => this.save($event));
}
public reset() {

@ -1,5 +1,5 @@
<div *ngIf="editable"
(focusout)="resetWhenFocusOutside($event)"
(focusout)="saveWhenFocusOutside($event)"
class="editable-toolbar-title--container">
<a *ngIf="showSave"
role="link"

Loading…
Cancel
Save