Add layout event
This commit is contained in:
@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user