Force touch support off for PhantomJS

PhantomJS has `'ontouchstart' in document.documentElement`, but
doesn't actually support touch.

http://code.google.com/p/phantomjs/issues/detail?id=375
https://github.com/ariya/phantomjs/pull/408
https://github.com/Leaflet/Leaflet/pull/1434#issuecomment-13843151
This commit is contained in:
John Firebaugh 2013-02-20 09:17:06 -08:00
parent 6ef25866eb
commit fb9450f975
2 changed files with 9 additions and 1 deletions

View File

@ -12,7 +12,8 @@ for (var i=0; i < libSources.length; i++) {
files = [].concat([ files = [].concat([
JASMINE, JASMINE,
JASMINE_ADAPTER, JASMINE_ADAPTER,
"before.js" "before.js",
"testacular.js"
], libSources, [ ], libSources, [
"after.js", "after.js",
"happen.js", "happen.js",

7
spec/testacular.js Normal file
View File

@ -0,0 +1,7 @@
// PhantomJS has `'ontouchstart' in document.documentElement`, but
// doesn't actually support touch. So force touch not to be used.
//
// http://code.google.com/p/phantomjs/issues/detail?id=375
// https://github.com/ariya/phantomjs/pull/408
// https://github.com/Leaflet/Leaflet/pull/1434#issuecomment-13843151
window.L_NO_TOUCH = true;