Browse Source

Better fix for modal.

pull/387/head
Sebastian Stehle 7 years ago
parent
commit
44165fba58
  1. 10
      src/Squidex/app/framework/angular/modals/modal.directive.ts

10
src/Squidex/app/framework/angular/modals/modal.directive.ts

@ -122,13 +122,11 @@ export class ModalDirective implements OnDestroy {
private subscribeToView() { private subscribeToView() {
if (this.closeAuto) { if (this.closeAuto) {
this.eventsView.own(timer(500).subscribe(() => { document.addEventListener('mousedown', this.documentClickListener, true);
document.addEventListener('click', this.documentClickListener, true);
this.eventsView.own(() => { this.eventsView.own(() => {
document.removeEventListener('click', this.documentClickListener, true); document.removeEventListener('mousedown', this.documentClickListener, true);
}); });
}));
} }
if (this.closeAlways && this.renderRoots) { if (this.closeAlways && this.renderRoots) {

Loading…
Cancel
Save