From 43d9e2e1a40ddcdec4c11507dba7302a41dc501b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 8 Dec 2010 16:06:42 +0000 Subject: [PATCH] the drag handler's mouseout func should check if the mouse left the map viewport div as opposed to the map div, r=ahocevar (closes #2941) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10956 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Handler/Drag.js | 2 +- tests/Handler/Drag.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Handler/Drag.js b/lib/OpenLayers/Handler/Drag.js index 339dcfe758..d9603b0a90 100644 --- a/lib/OpenLayers/Handler/Drag.js +++ b/lib/OpenLayers/Handler/Drag.js @@ -313,7 +313,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, { * {Boolean} Let the event propagate. */ mouseout: function (evt) { - if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.div)) { + if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) { if(this.documentDrag === true) { this.addDocumentEvents(); } else { diff --git a/tests/Handler/Drag.html b/tests/Handler/Drag.html index 581ffcca14..09e5d42a35 100644 --- a/tests/Handler/Drag.html +++ b/tests/Handler/Drag.html @@ -251,7 +251,7 @@ t.ok(evt.xy.x == testEvents.done.xy.x && evt.xy.y == testEvents.done.xy.y, "mouseout calls Util.mouseLeft with the correct event"); - t.eq(element.id, map.div.id, + t.eq(element.id, map.viewPortDiv.id, "mouseout calls Util.mouseLeft with the correct element"); return true; }