diff --git a/src/Squidex/app/features/schemas/pages/schema/types/string-validation.component.html b/src/Squidex/app/features/schemas/pages/schema/types/string-validation.component.html index 3a9f2e30e..884fd8c85 100644 --- a/src/Squidex/app/features/schemas/pages/schema/types/string-validation.component.html +++ b/src/Squidex/app/features/schemas/pages/schema/types/string-validation.component.html @@ -42,11 +42,11 @@ autocomplete="off" autocorrect="off" autocapitalize="off" - (focus)="patternsModal.show()" (blur)="patternsModal.hide()" /> + (focus)="patternsModal.show()" /> - -
+ +

Suggestions

diff --git a/src/Squidex/app/framework/angular/forms/autocomplete.component.html b/src/Squidex/app/framework/angular/forms/autocomplete.component.html index f83b6014c..5b62c0310 100644 --- a/src/Squidex/app/framework/angular/forms/autocomplete.component.html +++ b/src/Squidex/app/framework/angular/forms/autocomplete.component.html @@ -6,7 +6,7 @@ autocapitalize="off"> -
+
; @@ -32,6 +36,9 @@ interface State { styleUrls: ['./autocomplete.component.scss'], templateUrl: './autocomplete.component.html', providers: [SQX_AUTOCOMPLETE_CONTROL_VALUE_ACCESSOR], + animations: [ + fadeAnimation + ], changeDetection: ChangeDetectionStrategy.OnPush }) export class AutocompleteComponent extends StatefulControlComponent implements OnInit { diff --git a/src/Squidex/app/framework/angular/forms/color-picker.component.html b/src/Squidex/app/framework/angular/forms/color-picker.component.html index abf2e76d2..f97aa9450 100644 --- a/src/Squidex/app/framework/angular/forms/color-picker.component.html +++ b/src/Squidex/app/framework/angular/forms/color-picker.component.html @@ -16,8 +16,8 @@
+ [style.height]="'280px'" + [style.width]="'230px'">
-
+
{ + document.addEventListener('click', this.documentClickListener, true); - this.eventsView.own(() => { - document.removeEventListener('click', this.documentClickListener); - }); + this.eventsView.own(() => { + document.removeEventListener('click', this.documentClickListener, true); + }); + })); } if (this.closeAlways && this.renderRoots) { @@ -138,7 +140,7 @@ export class ModalDirective implements OnDestroy { private elementListener = (event: MouseEvent) => { if (this.isClickedInside(event)) { - hideModal(this.currentModel); + this.hideModal(this.currentModel); } } @@ -146,8 +148,8 @@ export class ModalDirective implements OnDestroy { const model = this.currentModel; if (!this.isClickedInside(event)) { - this.eventsView.own(timer(0, 100).subscribe(() => { - hideModal(model); + this.eventsView.own(timer(100).subscribe(() => { + this.hideModal(model); })); } } @@ -169,11 +171,13 @@ export class ModalDirective implements OnDestroy { return false; } } -} -function hideModal(model: Model) { - if (model && isModalModel(model)) { - model.hide(); + private hideModal(model: Model) { + if (model && isModalModel(model)) { + model.hide(); + + this.eventsView.unsubscribeAll(); + } } }