Skip to content

Commit b8ebba1

Browse files
authored
Check touch for event type instead of expand option (#255) (#272)
1 parent d611b9d commit b8ebba1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/control.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ export var Geocoder = L.Control.extend({
9494
},
9595
this
9696
);
97-
} else if (L.Browser.touch && this.options.expand === 'touch') {
97+
} else if (this.options.expand === 'touch') {
9898
L.DomEvent.addListener(
9999
container,
100-
'touchstart mousedown',
100+
L.Browser.touch ? 'touchstart mousedown' : 'mousedown',
101101
function(e) {
102102
this._toggle();
103103
e.preventDefault(); // mobile: clicking focuses the icon, so UI expands and immediately collapses

0 commit comments

Comments
 (0)