williamtroup/Calendar.js

Custom event click handler blocked due to CSS

Closed this issue · 2 comments

Describe the bug
The onEventClick custom trigger is not firing as expected when using the timeline view within the calendar. This is caused by the timeline-row-item-spacing divs having a z-index value higher than the event div, thus firing the click event of that object and not the event object. Setting the z-index value to 2001 allows the event to be clicked as expected. Additionally, I had to set the z-index of the timeline-row-item (row header) to be 2005 to allow the events to scroll underneath them as original functionality intended.

To Reproduce
Steps to reproduce the behavior:
Create basic calendar instance with options set for onEventClick custom trigger that will log a message to the console
Add an event to the calendar
Switch to "Timeline" view using the "View Timeline" button
Click on your new event
View console to see that output is not there for the custom trigger

Expected behavior
Expected that the custom trigger defined in the option to fire, in the most basic example, to write output to the console.

Screenshots
No screenshots.

Desktop (please complete the following information):

OS: Windows 10, v22H2, build 19045.3930
Browser: Chrome v121.0.6167.161 (64-bit), Edge v121.0.2277.112 (64-bit)

I'm going to get this fixed in the next release :)

This has been fixed in v2.10.13.