add comment as to why clearTimer is needed here, and change control flow back to what it was before breakage, i.e. do not call clearTimer if it does not pass the tolerance
This commit is contained in:
@@ -331,10 +331,13 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
|
|||||||
* Handle double-click sequence.
|
* Handle double-click sequence.
|
||||||
*/
|
*/
|
||||||
handleDouble: function(evt) {
|
handleDouble: function(evt) {
|
||||||
if (this["double"] && this.passesDblclickTolerance(evt)) {
|
if (this.passesDblclickTolerance(evt)) {
|
||||||
this.callback("dblclick", [evt]);
|
if (this["double"]) {
|
||||||
|
this.callback("dblclick", [evt]);
|
||||||
|
}
|
||||||
|
// to prevent a dblclick from firing the click callback in IE
|
||||||
|
this.clearTimer();
|
||||||
}
|
}
|
||||||
this.clearTimer();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user