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

@ -183,6 +183,13 @@ export class Range implements ComponentInterface {
this.gesture.setDisabled(this.disabled);
}
componentDidUnload() {
if (this.gesture) {
this.gesture.destroy();
this.gesture = undefined;
}
}
private handleKeyboard = (knob: KnobName, isIncrease: boolean) => {
let step = this.step;
step = step > 0 ? step : 1;