Add layout event

This commit is contained in:
2023-09-02 00:13:59 +02:00
parent 3af695daab
commit 7420945748
2 changed files with 3 additions and 1 deletions

View File

@ -195,11 +195,13 @@ class TpPopup extends EventHelpers(Position(DomQuery(LitElement))) {
this._cleanupEvents();
this.listen(document, 'mousedown', '_docClick');
this.scrollTarget.addEventListener('scroll', this.fit, { passive: true });
this.scrollTarget.addEventListener('layout', this.fit, { passive: true });
}
_cleanupEvents() {
this.unlisten(document, 'mousedown', '_docClick');
this.scrollTarget.removeEventListener('scroll', this.fit, { passive: true });
this.scrollTarget.removeEventListener('layout', this.fit, { passive: true });
}
}