Skip to content

Commit

Permalink
Remove touchstart event from bootstrap-dropdown.js
Browse files Browse the repository at this point in the history
Causes dropdown events to trigger twice on mobile
Reference: twbs#6488
  • Loading branch information
james9909 committed Jun 15, 2017
1 parent fcb6e64 commit 30059d5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions js/bootstrap-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,9 @@
* =================================== */

$(document)
.on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
.on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
.on('touchstart.dropdown.data-api', '.dropdown-menu', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
.on('click.dropdown.data-api', clearMenus)
.on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)

}(window.jQuery);

0 comments on commit 30059d5

Please sign in to comment.