Skip to content

Commit

Permalink
Fix text box on touch devices
Browse files Browse the repository at this point in the history
You cannot tap on it on iPad as the touchstart event falls through to the map.

Fixes #3 and CloudMade/Leaflet#1163
  • Loading branch information
danzel committed Dec 11, 2012
1 parent e7cd8f0 commit bdcd04e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Control.BingGeocoder.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

L.Control.BingGeocoder = L.Control.extend({
options: {
collapsed: true,
Expand All @@ -25,11 +24,7 @@ L.Control.BingGeocoder = L.Control.extend({
var className = 'leaflet-control-geocoder',
container = this._container = L.DomUtil.create('div', className);

if (!L.Browser.touch) {
L.DomEvent.disableClickPropagation(container);
} else {
L.DomEvent.addListener(container, 'click', L.DomEvent.stopPropagation);
}
L.DomEvent.disableClickPropagation(container);

var form = this._form = L.DomUtil.create('form', className + '-form');

Expand Down

0 comments on commit bdcd04e

Please sign in to comment.