Scheduler: TypeError in touchend handler when tapping a second Scheduler instance within 500 ms (touch devices)
1 hours ago.
Version: DayPilot Lite for JavaScript 2026.1.809. The same code path is still present in 2026.4.895 (checked the npm build).
Environment: iPad Safari (also reproducible in Chrome DevTools with touch emulation). Two or more DayPilot.Scheduler instances on the same page, timeRangeSelectedHandling: "Enabled".
Error
Safari: `TypeError: undefined is not an object (evaluating 's.coords.x')`
Chrome: `TypeError: Cannot read properties of undefined (reading 'x')`
Thrown from the Scheduler's touchend handler (nav.top.ontouchend).
Steps to reproduce
1. Create two Scheduler instances on one page (see snippet below).
2. On a touch device, tap an empty cell in scheduler A.
3. Within 500 ms, tap an empty cell in scheduler B. Scheduler B must not have been touched before since page load.
4. The TypeError is thrown and no time range selection happens in B.
<div id="a"></div>
<div id="b"></div>
<script>
const cfg = { timeRangeSelectedHandling: "Enabled", startDate: "2026-10-30", days: 1, scale: "Hour",
resources: [{ name: "R1", id: "1" }], onTimeRangeSelected: args => console.log(args.start) };
const a = new DayPilot.Scheduler("a", cfg); a.init();
const b = new DayPilot.Scheduler("b", cfg); b.init();
</script>
DayPilot