mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
fix(tapClick): throttle activated
This commit is contained in:
@ -14,6 +14,7 @@ export class TapClick {
|
||||
|
||||
self.pointerTolerance = 4;
|
||||
self.lastTouch = 0;
|
||||
self.lastActivated = 0;
|
||||
self.disableClick = 0;
|
||||
self.disableClickLimit = 2500;
|
||||
|
||||
@ -145,7 +146,13 @@ export class TapClick {
|
||||
|
||||
if (activatableEle) {
|
||||
this.start = pointerCoord(ev);
|
||||
this.activator.downAction(ev, activatableEle, this.start.x, this.start.y);
|
||||
|
||||
let now = Date.now();
|
||||
if (this.lastActivated + 100 < now) {
|
||||
this.activator.downAction(ev, activatableEle, this.start.x, this.start.y);
|
||||
this.lastActivated = now;
|
||||
}
|
||||
|
||||
this.moveListeners(true);
|
||||
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user