vendor/assets/javascripts/webshims/shims/combos/17.js in webshims-rails-1.15.2 vs vendor/assets/javascripts/webshims/shims/combos/17.js in webshims-rails-1.15.3

- old
+ new

@@ -2362,10 +2362,17 @@ var runHandler = function(){ if(!stopClick){ return handler.apply(this, arguments); } }; + if($.isFunction(target)){ + handler = target; + target = false; + this.on('click', runHandler); + } else { + this.on('click', target, runHandler); + } if(addTouch){ allowClick = function(){ stopClick = false; }; touchEnd = function(e){ @@ -2410,20 +2417,14 @@ }; this.each(function(){ this.addEventListener('touchstart', touchStart, true); }); - } else if(supportsTouchaction){ + } else if(supportsTouchaction && !target){ this.css('touch-action', 'manipulation'); } - if($.isFunction(target)){ - handler = target; - target = false; - this.on('click', runHandler); - } else { - this.on('click', target, runHandler); - } + return this; }; })(); }