The click and hover handlers need to take care that the event they are handling doesn't get modified before the delayed listeners get called. Appears to only be a problem in IE. Thanks for the catch madair. r=crschmidt (closes #1393)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@6414 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -129,10 +129,10 @@
|
||||
t.fail("clearTimeout called with non-existent timerId");
|
||||
}
|
||||
}
|
||||
var testEvt = Math.random();
|
||||
var testEvt = {id: Math.random()};
|
||||
handler.callbacks = {
|
||||
"click": function(evt) {
|
||||
t.eq(evt, testEvt,
|
||||
t.eq(evt.id, testEvt.id,
|
||||
"(click w/ single true) click callback called with correct evt");
|
||||
},
|
||||
"dblclick": function(evt) {
|
||||
@@ -203,7 +203,7 @@
|
||||
// mouse moves one pixel, click should be called
|
||||
handler.callbacks = {
|
||||
"click": function(evt) {
|
||||
t.ok(evt == clickEvt, "(pixelTolerance met) click called");
|
||||
t.ok(evt.xy == clickEvt.xy, "(pixelTolerance met) click called");
|
||||
}
|
||||
};
|
||||
map.events.triggerEvent("click", clickEvt);
|
||||
|
||||
Reference in New Issue
Block a user