Repository navigation
v2.1.0-rc.4
Pre-release
Pre-release
Recognizers
- Return clean terminal
STATE_ENDEDandSTATE_CANCELLEDstates inAttrRecognizerwithout leakingSTATE_BEGAN/STATE_CHANGEDbits - Immediately cancel armed
_requiredBydependents when a required recognizer commits inRecognizer.requireFailure() - Preserve terminal
STATE_RECOGNIZEDwhen a committing recognizer disables itself inside its own handler
Input
- Compute
distanceandangleconsistently from rebased(deltaX, deltaY)across single- and multi-touch transitions (fixes 3→2 finger liftoff jumps) - Unify non-touch release checks in
PointerEventInputto!(ev.buttons & 1), fixing stylus tip lift while holding a barrel button (buttons === 2) - Drop redundant single-touch
hasParent()check inTouchInput(also fixes single-touch on slotted light-DOM children inside closed Shadow DOM) - Treat
sourceCapabilities.firesTouchEventsas authoritative when present inTouchMouseInputso explicitfiresTouchEvents: falsemouse clicks are not suppressed for 2.5s - Self-heal stale
startedstate inSingleTouchInputon unrelated freshtouchstart(stopping the abandoned session), clear stalesession.prevInputon fresh target starts, and computeisFirstcleanly when another finger rests outside the target - Wrap
hammer.inputemits insidetry ... finallyininputHandler()sosession.prevInputstays consistent if a listener throws
Manager & Touch-action
- Exempt 2-finger pinch-zoom in the JS
TouchActionpolyfill for compoundpan-x pinch-zoom/pan-y pinch-zoom(e.g.new Hammer(document)/new Hammer(window)) - Preserve
Hammer.defaults.preset.concat(...)preset-override compatibility duringManagerconstruction and makeManager.destroy()idempotent
Internal Simplification
- Remove unused internal helpers (
ifUndefined,inStr,inArray,toArray,uniqueArray,simpleCloneInputData,hasSamePrimaryPointerPair,canContinueEmit,updateInputListeners,getTouchActionProps), redundant state flags (PressRecognizer._recognized,TouchMouseInput._touchActive), and unreachable/test-only guards (net −250 lines insrc/)
Full Changelog: v2.1.0-rc.3...v2.1.0-rc.4