Improves click handling on calendar elements

Removes `pointer-events: none` from various calendar elements.
This ensures that the elements are correctly interactive,
allowing the user to click on them as intended.
This commit is contained in:
Janus C. H. Knudsen 2025-10-07 17:36:03 +02:00
parent 3982e2f25f
commit e2cf4d1e04
5 changed files with 0 additions and 17 deletions

View file

@ -155,7 +155,6 @@ swp-hour-marker::before {
/* Full viewport width minus time-axis width */
height: 1px;
background: var(--color-hour-line);
pointer-events: none;
z-index: 2;
/* Ensure it appears above other elements */
}
@ -175,7 +174,6 @@ swp-time-grid::after {
transparent calc(var(--hour-height) - 1px),
var(--color-hour-line) calc(var(--hour-height) - 1px),
var(--color-hour-line) var(--hour-height));
pointer-events: none;
z-index: 1;
}
@ -240,7 +238,6 @@ swp-calendar-header::-webkit-scrollbar-track {
swp-day-header {
grid-row: 1;
/* Explicitly place day headers in row 1 */
pointer-events: auto;
/* Ensure header clicks work despite parent scrollbar */
text-align: center;
border-right: 1px solid var(--color-grid-line);
@ -330,7 +327,6 @@ swp-allday-column {
position: relative;
opacity: 0;
/* Invisible but functional */
pointer-events: auto;
/* Enable mouse events */
background: transparent;
z-index: 1;
@ -479,7 +475,6 @@ swp-time-grid::before {
right: 0;
background: transparent;
min-width: calc(var(--grid-columns, 7) * var(--day-column-min-width));
pointer-events: none;
display: none;
/* Disabled - using per-column overlays instead */
}
@ -493,7 +488,6 @@ swp-grid-lines {
bottom: 0;
min-width: calc(var(--grid-columns, 7) * var(--day-column-min-width));
/* Dynamic width */
pointer-events: none;
z-index: var(--z-grid);
background-image: repeating-linear-gradient(to bottom,
transparent,
@ -529,7 +523,6 @@ swp-day-column::before {
left: 0;
right: 0;
background: var(--color-non-work-hours);
pointer-events: none;
z-index: 2;
/* Before work period - from day start to work start */
@ -545,7 +538,6 @@ swp-day-column::after {
left: 0;
right: 0;
background: var(--color-non-work-hours);
pointer-events: none;
z-index: 2;
/* After work period - from work end to day end */
@ -585,12 +577,10 @@ swp-events-layer {
inset: 0;
display: block;
z-index: var(--z-event);
pointer-events: none;
/* Allow clicks to pass through to day column */
}
swp-day-columns swp-event {
pointer-events: auto;
}
/* Current time indicator */
@ -600,7 +590,6 @@ swp-current-time-indicator {
right: 0;
height: 2px;
background: var(--color-current-time);
pointer-events: none;
z-index: var(--z-current-time);
/* Time label */