Permalink
Browse files

fix #643, when element has no style attribute

  • Loading branch information...
jtangelder committed Oct 25, 2014
1 parent 1cab23e commit 5ca6d8cbead02c71929a8073e95ddf98e11c0e06
Showing with 4 additions and 1 deletion.
  1. +3 −0 src/manager.js
  2. +1 −1 src/touchaction.js
View
@@ -262,6 +262,9 @@ Manager.prototype = {
*/
function toggleCssProps(manager, add) {
var element = manager.element;
+ if(!element.style) {
+ return;
+ }
each(manager.options.cssProps, function(value, name) {
element.style[prefixed(element.style, name)] = add ? value : '';
});
View
@@ -32,7 +32,7 @@ TouchAction.prototype = {
value = this.compute();
}
- if (NATIVE_TOUCH_ACTION) {
+ if (NATIVE_TOUCH_ACTION && this.manager.element.style) {
this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;
}
this.actions = value.toLowerCase().trim();

0 comments on commit 5ca6d8c

Please sign in to comment.