Fix touch control not working in Firefox.

This commit is contained in:
Simo Kinnunen
2014-04-23 14:26:59 +09:00
parent 272301d519
commit b9e4cfc10d
4 changed files with 29 additions and 9 deletions

View File

@@ -0,0 +1,2 @@
module.exports = angular.module('stf/util/vendor', [])
.factory('VendorUtil', require('./vendor-util'))

View 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
}