Skip to content

v1.0.3

Choose a tag to compare

@yoannmoinet yoannmoinet released this 15 May 14:58
· 5 commits to master since this release
b8b5d22

NippleJS v1.0.3

A small patch release fixing TypeScript event handler overload inference and a multi-manager DOM containment bug. Thanks @akromann for the report and fixes in #245.

🌐 Documentation · 🎮 Interactive Demos · 📦 npm


🐛 Bug Fixes

  • Multiple managers couldn't open joysticks simultaneouslyJoystick.start() checked document.body.contains() to decide whether to re-add the element, which returned true for any joystick already mounted anywhere in the DOM. This caused a manager to skip mounting its joystick when another manager already had one active. Now uses zone.contains() so each manager checks its own zone. (6418df2)
  • TypeScript on() handler type was unusable without as anySuperEventType resolved to a union of all possible event payloads instead of narrowing based on the event name, forcing users to cast handlers. Added a generic parameter so the handler type narrows correctly to the matching EventDataMap entry. (2ff4c51)

Full Changelog: v1.0.2...v1.0.3