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:
1 parent
f28c432b34
commit
1dba227db4
1 file changed
+6
-3
@@ -331,10 +331,13 @@ OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
|
||||
* Handle double-click sequence.
|
||||
*/
|
||||
handleDouble: function(evt) {
|
||||
if (this["double"] && this.passesDblclickTolerance(evt)) {
|
||||
this.callback("dblclick", [evt]);
|
||||
if (this.passesDblclickTolerance(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