Skip to content
Browse files

Update handjs to 1.3.5

This fix http://handjs.codeplex.com/SourceControl/changeset/105194 is
required for b-slider to work.
  • Loading branch information...
1 parent a8e695b commit 60b296edeab8d50434ff615d504c44a03ccfc606 Sergey Tatarintsev committed Feb 19, 2014
Showing with 8 additions and 7 deletions.
  1. +8 −7 blocks-touch/i-pointer-events/i-pointer-events.js
View
15 blocks-touch/i-pointer-events/i-pointer-events.js
@@ -3,6 +3,7 @@
if (window.PointerEvent)
return;
+
// Installing Hand.js
var supportedEventsNames = ["pointerdown", "pointerup", "pointermove", "pointerover", "pointerout", "pointercancel", "pointerenter", "pointerleave"];
var upperCaseEventsNames = ["PointerDown", "PointerUp", "PointerMove", "PointerOver", "PointerOut", "PointerCancel", "PointerEnter", "PointerLeave"];
@@ -231,9 +232,9 @@
}
if (checkRegistration) {
- generateTouchEventProxyIfRegistered(name, touchPoint, previousTargets[touchPoint.identifier], eventObject);
+ generateTouchEventProxyIfRegistered(name, touchPoint, previousTargets[touchPoint.identifier], eventObject, true);
} else {
- generateTouchEventProxy(name, touchPoint, previousTargets[touchPoint.identifier], eventObject);
+ generateTouchEventProxy(name, touchPoint, previousTargets[touchPoint.identifier], eventObject, true);
}
}
};
@@ -358,7 +359,7 @@
// Hooks
interceptAddEventListener(window);
- interceptAddEventListener(typeof HTMLElement !== "undefined" ? HTMLElement : Element);
+ interceptAddEventListener(HTMLElement || Element);
interceptAddEventListener(document);
interceptAddEventListener(HTMLBodyElement);
interceptAddEventListener(HTMLDivElement);
@@ -378,7 +379,7 @@
}
interceptRemoveEventListener(window);
- interceptRemoveEventListener(typeof HTMLElement !== "undefined" ? HTMLElement : Element);
+ interceptRemoveEventListener(HTMLElement || Element);
interceptRemoveEventListener(document);
interceptRemoveEventListener(HTMLBodyElement);
interceptRemoveEventListener(HTMLDivElement);
@@ -458,11 +459,11 @@
node = node.parentNode;
}
}
-
+
// Handling events on window to prevent unwanted super-bubbling
// All mouse events are affected by touch fallback
function applySimpleEventTunnels(nameGenerator, eventGenerator) {
- ["pointerdown", "pointermove", "pointerup", "pointerover", "pointerout"].map(function (eventName) {
+ ["pointerdown", "pointermove", "pointerup", "pointerover", "pointerout"].forEach(function (eventName) {
window.addEventListener(nameGenerator(eventName), function (evt) {
if (!touching && findEventRegisteredNode(evt.target, eventName))
eventGenerator(evt, eventName, true);
@@ -583,7 +584,7 @@
}
}
})();
-
+
// Extension to navigator
if (navigator.pointerEnabled === undefined) {

0 comments on commit 60b296e

Please sign in to comment.
Something went wrong with that request. Please try again.