make Android double-click issue threshold smaller, close #2303
This commit is contained in:
parent
8764063c46
commit
9a6288ef37
@ -201,12 +201,12 @@ L.DomEvent = {
|
||||
var timeStamp = (e.timeStamp || e.originalEvent.timeStamp),
|
||||
elapsed = L.DomEvent._lastClick && (timeStamp - L.DomEvent._lastClick);
|
||||
|
||||
// are they closer together than 1000ms yet more than 100ms?
|
||||
// are they closer together than 500ms yet more than 100ms?
|
||||
// Android typically triggers them ~300ms apart while multiple listeners
|
||||
// on the same event should be triggered far faster;
|
||||
// or check if click is simulated on the element, and if it is, reject any non-simulated events
|
||||
|
||||
if ((elapsed && elapsed > 100 && elapsed < 1000) || (e.target._simulatedClick && !e._simulated)) {
|
||||
if ((elapsed && elapsed > 100 && elapsed < 500) || (e.target._simulatedClick && !e._simulated)) {
|
||||
L.DomEvent.stop(e);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user