Add layout event
This commit is contained in:
parent
3af695daab
commit
7420945748
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tp/tp-popup",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "",
|
||||
"main": "tp-popup.js",
|
||||
"scripts": {
|
||||
|
@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user