Handler.Feature may not trigger click when touching a feature, r=sbrunner

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11943 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2011-05-03 14:09:09 +00:00
parent e4d13784fa
commit 53984809ce
2 changed files with 9 additions and 3 deletions

View File

@@ -271,7 +271,7 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
var type = evt.type;
var handled = false;
var previouslyIn = !!(this.feature); // previously in a feature
var click = (type == "click" || type == "dblclick");
var click = (type == "click" || type == "dblclick" || type == "touchstart");
this.feature = this.layer.getFeatureFromEvent(evt);
if(this.feature && !this.feature.layer) {
// feature has been destroyed
@@ -282,7 +282,7 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, {
this.lastFeature = null;
}
if(this.feature) {
if(evt.type === "touchstart") {
if(type === "touchstart") {
// stop the event to prevent Android Webkit from
// "flashing" the map div
OpenLayers.Event.stop(evt);