fix(gesture): destroy gesture handler when it's done (#17184)

fixes #16433
fixes #16974
This commit is contained in:
Manu MA
2019-01-21 02:01:44 +01:00
committed by GitHub
parent 766c79d2a1
commit 59bd823d05
9 changed files with 37 additions and 7 deletions

View File

@ -118,6 +118,13 @@ export class Toggle implements ComponentInterface {
this.disabledChanged();
}
componentDidUnload() {
if (this.gesture) {
this.gesture.destroy();
this.gesture = undefined;
}
}
@Listen('click')
onClick() {
if (this.lastDrag + 300 < Date.now()) {