Stop. Hammer time. (Again. Sorry for long wait!)
Note: #1328 fixes a long-standing sign bug in
getRotation()(endAngle - startAngleinstead ofendAngle + startAngle) so initial two-finger rotation starts at0°rather than2 * startAngle. If your application previously worked around the old offset, please verify rotation handling when upgrading.
Manager
- Guard index before splicing in
Manager.off()when removing an unregistered handler (#1308) - Skip unsupported
cssPropsintoggleCssProps()instead of writingelement.style[undefined](#1312) - Clear
inputandoptions.inputTargetDOM references onManager.destroy()(#1325) - Reset recognizers and clear
recognizer.managerinManager.remove(), halt activerecognize()cycles and cancel pending timers inManager.destroy(), and guardTouchAction.set()afterdestroy()(#1330) - Restore previous inline styles and apply updated
cssPropswhen changed viaManager.set({ cssProps })(#1333, fixes #1286) - Populate
data.typeanddata.preventDefaultbefore dispatching DOM events whendomEvents: true(#1335) - Stop the active session and reset recognizers when disabling a manager mid-gesture via
Manager.set({ enable: false })(#1343)
Input
- Check
srcEvent.sourceCapabilities.firesTouchEventsinTouchMouseInputto suppress synthetic mouse events (#1310) - Return
DIRECTION_NONEonly when bothxandyare zero ingetDirection()(#1313) - Snapshot
PointerEventInputpointersarray and remove ended/cancelled pointers fromstorebefore invoking the callback (#1316, fixes #1213) - Fix
getRotation()to subtract the start angle instead of adding (#1328, fixes #914, #791, #1208) - Rebind child
TouchInputandMouseInputtargets and listeners inTouchMouseInput.init()onManager.set({ inputTarget })(#1329) - Reset recognizers (including
PanRecognizer.pX/pY) on the next session afterManager.stop()sopanstartis not skipped (#1332, fixes #811) - Guard zero initial pointer distance in
getScale()to return1instead ofNaN/Infinity(#1334) - Support standard
MouseEvent.buttonsbitmask alongside legacyev.whichonmousemoveinMouseInput(#1336, fixes #976) - End stuck mouse pointers in
PointerEventInputwhenpointermovearrives withev.buttons === 0, and clearthis.storeondestroy()(#1337) - Avoid re-attaching
manager.session.prevInputininputHandler()afterManager.destroy()(#1341) - Ignore
Input.domHandlerevents if the manager was already destroyed during the same dispatch (#1342, fixes #1016) - Keep already-tracked touches in
TouchInputtargetTouchesif their child target element is detached from the DOM mid-gesture (#1345)
Recognizers
- Check axis-specific velocity (
overallVelocityX/overallVelocityY) inSwipeRecognizerwhen only one axis is configured (#1314) - Guard null lookups in
Recognizer.recognizeWith(),dropRecognizeWith(),requireFailure(), anddropRequireFailure()(#1315) - Return
STATE_FAILEDinAttrRecognizer.process()whenINPUT_CANCELarrives before recognition (#1327, fixes #1050, #1132) - Always clear
PressRecognizer._timeronINPUT_ENDandINPUT_CANCELregardless ofdeltaTime(#1331, fixes #1129) - Do not recognize pans when
PanRecognizerdirectionis set toHammer.DIRECTION_NONE(#1338, fixes #1257)
Touch-action
- Skip
preventDefault()on non-cancelable events (srcEvent.cancelable === false) (#1311) - Normalize whitespace and casing in
TouchAction.set()beforecomputeand native CSStouch-actionlookup (#1344)
Core & Utils
- Return numeric
-1/0/1comparator inuniqueArray()sort for stable cross-engine pointer ordering (#1307, fixes #985) - Return an empty array for empty or whitespace-only strings in
splitStr()(#1309) - Guard
window,document, andnavigatoron module load for SSR / Node.js compatibility (#1324, fixes #1060, #930, #1245, #1296, #1290) - Guard
prefixed()againstnullorundefinedtarget objects (#1326) - Shallow-clone caller
optionsinHammer()so caller objects are not mutated andObject.freeze()options work (#1339) - Restore
.constructorproperty onRecognizer,Manager,Input, andTouchActionprototypes (#1340, fixes #881)
Packaging, Build, Tests & CI
- Add npm
"files"allowlist (excludingtests/from published tarball), update vendored test jQuery to3.7.1, and drop unused Lo-Dash2.4.1(#1317) - Modernize
devDependencies(0npm auditvulnerabilities), replace JSHint/JSCS with ESLint v10, and run QUnit in headless Chrome via Puppeteer (#1318) - Add GitHub Actions CI (
ci.yml), automated GitHub Release + npm OIDC Trusted Publishing workflow (release.yml), untrack compiledhammer.js/hammer.min.js/hammer.min.js.mapfrom git, and add Dependabot config (#1321, #1347, #1350) - Expand unit test suite coverage, add SSR smoke test, and disable
window.PointerEventintests/unit/index.htmlfor direct browser test runs (#1322, #1353) - Add
RELEASING.md, modernizeREADME.md, updatepackage.jsonmetadata (httpshomepage,jsdelivr/unpkg, keywords), and remove obsolete legacy files (component.json,.bowerrc,bower.json,hammer.min.map,changelog.js) (#1319, #1323, #1346, #1348, #1349, #1351)