Skip to content

Commit

Permalink
iOS a-input: change hasTouchEvent()
Browse files Browse the repository at this point in the history
Used for test purposes

Makes it easier to debug on Chrome

Signed-off-by: Nicolas Lesconnec <nicolas.lesconnec.pro@gmail.com>
  • Loading branch information
Nicolas Lesconnec committed Feb 9, 2012
1 parent acbbd9c commit a6ed7bb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/adapters/ios/inputs/touch.js
Expand Up @@ -22,12 +22,15 @@ Joshfire.define(['joshfire/input', 'joshfire/class', 'joshfire/vendor/zepto'], f
var self = this;

function hasTouchEvent() {

return 'ontouchstart' in window;
/*
try {
document.createEvent('TouchEvent');
return true;
} catch (e) {
return false;
}
}*/
}

// When using iScroll, touchstarts are first handled here but passed because of elt.hasScroller.
Expand Down

0 comments on commit a6ed7bb

Please sign in to comment.