Skip to content

Commit

Permalink
remove touch test.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Jun 14, 2010
1 parent 84549c5 commit 1356c9c
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ window.Modernizr = (function(window,doc,undefined){
websqldatabase = 'websqldatabase',
websocket = 'websocket',
smile = ':)',
touch = 'touch',

// IE7 gets mad if you name a local variable `toString`
tostring = Object.prototype.toString,
Expand Down Expand Up @@ -275,21 +274,17 @@ window.Modernizr = (function(window,doc,undefined){
* the Palm Pre / WebOS (touch) phones.
* Additionally, chrome used to lie about its support on this, but that
* has since been recitifed: http://crbug.com/36415
*/
* Because there is no way to reliably detect Chrome's false positive
* without UA sniffing we have removed this test from Modernizr. We
* hope to add it in after Chrome 5 has been sunsetted.
* See also http://github.com/Modernizr/Modernizr/issues#issue/84
tests[touch] = function() {
var bool = !!('ontouchstart' in window)

// to be extra safe we'll have a fallback test
bool && doc.addEventListener && doc.addEventListener('mousemove',function mousemove(){
doc.removeEventListener('mousemove',mousemove,false);
Modernizr[touch] = ret[touch] = false;
docElement.className = docElement.className.replace(/\stouch\b/,' no-touch');
},false);
return !!('ontouchstart' in window);
return bool;
};

*/

/**
* geolocation tests for the new Geolocation API specification.
Expand Down

0 comments on commit 1356c9c

Please sign in to comment.