Skip to content

Commit

Permalink
Update handjs to 1.3.5
Browse files Browse the repository at this point in the history
This fix http://handjs.codeplex.com/SourceControl/changeset/105194 is
required for b-slider to work.
  • Loading branch information
Sergey Tatarintsev committed Feb 19, 2014
1 parent a8e695b commit 60b296e
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions blocks-touch/i-pointer-events/i-pointer-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down Expand Up @@ -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);
}
}
};
Expand Down Expand Up @@ -358,7 +359,7 @@

// Hooks
interceptAddEventListener(window);
interceptAddEventListener(typeof HTMLElement !== "undefined" ? HTMLElement : Element);
interceptAddEventListener(HTMLElement || Element);
interceptAddEventListener(document);
interceptAddEventListener(HTMLBodyElement);
interceptAddEventListener(HTMLDivElement);
Expand All @@ -378,7 +379,7 @@
}

interceptRemoveEventListener(window);
interceptRemoveEventListener(typeof HTMLElement !== "undefined" ? HTMLElement : Element);
interceptRemoveEventListener(HTMLElement || Element);
interceptRemoveEventListener(document);
interceptRemoveEventListener(HTMLBodyElement);
interceptRemoveEventListener(HTMLDivElement);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -583,7 +584,7 @@
}
}
})();


// Extension to navigator
if (navigator.pointerEnabled === undefined) {
Expand Down

0 comments on commit 60b296e

Please sign in to comment.