Skip to content

Commit 6a0e88a

Browse files
committed
Disables fastclick on select2 objects
1 parent 68fe520 commit 6a0e88a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "adapt-fastclick",
3-
"version": "1.0.0",
3+
"version": "1.0.2",
44
"framework": "^2.0.0",
55
"displayName": "FastClick",
66
"extension": "adapt-fastclick",

js/adapt-fastclick.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
define(function() {
22
require(["libraries/fastclick.min.js"], function(FastClick) {
33
$(function() {
4+
var _needsClick = FastClick.prototype.needsClick;
5+
FastClick.prototype.needsClick = function(target) {
6+
return _needsClick(target) || /select2/.test(target.className);
7+
};
48
FastClick.attach(document.body);
59
});
610
});

0 commit comments

Comments
 (0)