Skip to content

Commit

Permalink
fix primefaces#6259: check if overlay still exists
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinListkowski authored and darkhelmet committed Mar 25, 2019
1 parent b82c8bd commit f2095f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/components/autocomplete/autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,11 @@ export class AutoComplete implements AfterViewChecked,AfterContentInit,DoCheck,C
ngAfterViewChecked() {
//Use timeouts as since Angular 4.2, AfterViewChecked is broken and not called after panel is updated
if (this.suggestionsUpdated && this.overlay && this.overlay.offsetParent) {
setTimeout(() => this.alignOverlay(), 1);
setTimeout(() => {
if (this.overlay) {
this.alignOverlay();
}
}, 1);
this.suggestionsUpdated = false;
}

Expand Down

0 comments on commit f2095f3

Please sign in to comment.