Skip to content

Commit

Permalink
Allow mouse to trigger control even when using touch as trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
Per Liedman committed Nov 12, 2017
1 parent ef5f573 commit 1771fbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/control.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ module.exports = {
}, this);
}
else if (L.Browser.touch && this.options.expand === 'touch') {
L.DomEvent.addListener(icon, 'touchstart', function(e) {
L.DomEvent.addListener(icon, 'touchstart mousedown', function(e) {
this._toggle();
e.preventDefault(); // mobile: clicking focuses the icon, so UI expands and immediately collapses
e.stopPropagation();
Expand Down

0 comments on commit 1771fbd

Please sign in to comment.