Skip to content

Commit

Permalink
possible fix for issue select2#77 better blur support for touch devic…
Browse files Browse the repository at this point in the history
…es like ipad
  • Loading branch information
ivaynberg committed Jun 8, 2012
1 parent 47064b2 commit 5e18e71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion select2.js
Expand Up @@ -317,7 +317,7 @@
* blurs any Select2 container that has focus when an element outside them was clicked or received focus
*/
$(document).ready(function () {
$(document).delegate("*", "mousedown focusin", function (e) {
$(document).delegate("*", "mousedown focusin touchstart", function (e) {
var target = $(e.target).closest("div.select2-container").get(0);
$(document).find("div.select2-container-active").each(function () {
if (this !== target) $(this).data("select2").blur();
Expand Down

0 comments on commit 5e18e71

Please sign in to comment.