Permalink
Browse files

[touch] i-jquery__pointer-events: Android events fix

  • Loading branch information...
1 parent de12104 commit 18188235455afd5e3e3b3cf1e7f55777a0aebe5a @deepsweet deepsweet committed Sep 5, 2012
Showing with 5 additions and 4 deletions.
  1. +5 −4 blocks-touch/i-jquery/__pointer-events/i-jquery__pointer-events.js
@@ -7,15 +7,15 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
- * @version 0.3.1
+ * @version 0.3.2
*/
(function($) {
var events;
// тач
- if ('ontouchstart' in window && navigator.userAgent.indexOf('Android') === -1) {
+ if ('ontouchstart' in window) {
events = {
type: 'touch',
down: 'touchstart',
@@ -172,7 +172,8 @@
setup: function() {
// если мышь, то эмулируем тап через обычный клик
- if (events.type == 'mouse') {
+ // + костыль для Android
+ if (events.type == 'mouse' || /Android/.test(navigator.userAgent)) {
$(this).bind('click.tapEvent', function(e) {
e.type = 'tap';
@@ -235,4 +236,4 @@
};
-})(jQuery);
+})(jQuery);

0 comments on commit 1818823

Please sign in to comment.