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:
Tim Schaub
2008-02-29 07:30:34 +00:00
parent 8b91ee8d64
commit 323de7085b
4 changed files with 18 additions and 12 deletions

View File

@@ -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);