Scheduler: Cannot read properties of null (reading 'calendar')
Asked by Leo 1 years ago.
Hi Dan,
On the live demo on https://javascript.daypilot.org/demo/scheduler/index.html, using a touch device (Android, Chrome) and some wild scrolling, I receive the following errors.
Number one happens when you scroll with momentum and then tap on the screen to stop scrolling. I don’t believe it has a real-world impact.
Error two happened directly afterwards - we see this pop up on Sentry quite a lot as well, however I can’t confidently reproduce it.
I have added the code sections - these are from the minified code but might help nonetheless.
Answer posted by Dan Letecky [DayPilot] 1 years ago.
Hi Leo,
The error #2 should be fixed now. There was an issue with events located next to a disabled parent row (treePreventParentUsage: true) when you tried to move them into the disabled row and started dragging very close to the event border.
The error #1 should never happen as the event handler is marked as non-passive. However, another safeguard was added which should prevent it.
If any of these errors still happen with the latest sandbox build (2025.3.6532), please let me know.
Comment posted by Leo 1 years ago.
Hi Dan,
Many thanks for all your fixes!
I can still reproduce #1 on the sandbox build by scrolling on a touch device with momentum, and then tapping & holding onto the grid (triggering an event creation).