Merge pull request #976 from fredj/focus_touchend

Reset the map focus on 'mouseout' and 'touchend'
This commit is contained in:
Frédéric Junod
2013-09-04 07:06:22 -07:00

View File

@@ -652,7 +652,8 @@ ol.Map.prototype.handleMapBrowserEvent = function(mapBrowserEvent) {
// coordinates so interactions cannot be used.
return;
}
if (mapBrowserEvent.type == goog.events.EventType.MOUSEOUT) {
if (mapBrowserEvent.type == goog.events.EventType.MOUSEOUT ||
mapBrowserEvent.type == goog.events.EventType.TOUCHEND) {
this.focus_ = null;
} else {
this.focus_ = mapBrowserEvent.getCoordinate();