mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 08:33:24 +02:00
Fix touch control not working in Firefox.
This commit is contained in:
2
res/app/components/stf/util/vendor/index.js
vendored
Normal file
2
res/app/components/stf/util/vendor/index.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
module.exports = angular.module('stf/util/vendor', [])
|
||||
.factory('VendorUtil', require('./vendor-util'))
|
||||
15
res/app/components/stf/util/vendor/vendor-util.js
vendored
Normal file
15
res/app/components/stf/util/vendor/vendor-util.js
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
module.exports = function VendorUtilFactory() {
|
||||
var vendorUtil = {}
|
||||
|
||||
vendorUtil.style = function(props) {
|
||||
var testee = document.createElement('span')
|
||||
for (var i = 0, l = props.length; i < l; ++i) {
|
||||
if (testee.style[props[i]] !== void 0) {
|
||||
return props[i]
|
||||
}
|
||||
}
|
||||
return props[0]
|
||||
}
|
||||
|
||||
return vendorUtil
|
||||
}
|
||||
Reference in New Issue
Block a user