Skip to content

Commit 5e18e71

Browse files
committed
possible fix for issue select2#77 better blur support for touch devices like ipad
1 parent 47064b2 commit 5e18e71

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
* blurs any Select2 container that has focus when an element outside them was clicked or received focus
318318
*/
319319
$(document).ready(function () {
320-
$(document).delegate("*", "mousedown focusin", function (e) {
320+
$(document).delegate("*", "mousedown focusin touchstart", function (e) {
321321
var target = $(e.target).closest("div.select2-container").get(0);
322322
$(document).find("div.select2-container-active").each(function () {
323323
if (this !== target) $(this).data("select2").blur();

0 commit comments

Comments
 (0)