Closed sbmaxx closed 10 years ago
In mobile safari at least on each move action we trying to find touch-action property, but we have error here:
touch-action
findTouchAction: function(inEvent) { var n; if (HAS_FULL_PATH && inEvent.path) { var path = inEvent.path; for (var i = 0; i < path.length; i++) { n = path[i]; if (n.nodeType === Node.ELEMENT_NODE && n.hasAttribute('touch-action')) { return n.getAttribute('touch-action'); } } } else { n = inEvent.target; while(n) { if (n.hasAttribute('touch-action')) { return n.getAttribute('touch-action'); } n = n.parentNode || n.host; } } // auto is default return "auto"; },
Sometimes n doesn't have method hasAttribute. I did not search for the reason, but for workaround we can add
n
hasAttribute
typeof n.hasAttribute === 'function'
in condition.
I will search for the real issue later.
I think I fixed this in 8945a0b4 with n.nodeType === Node.ELEMENT_NODE. All Element nodes must have hasAttribute
n.nodeType === Node.ELEMENT_NODE
In mobile safari at least on each move action we trying to find
touch-action
property, but we have error here:Sometimes
n
doesn't have methodhasAttribute
. I did not search for the reason, but for workaround we can addin condition.
I will search for the real issue later.