aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/calendarBox
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-05-05 12:29:43 -0400
committerbobzel <zzzman@gmail.com>2025-05-05 12:29:43 -0400
commit076bdacc5f05dd124823981e49174d276a7aebfd (patch)
tree5459451218e0040035b15917d947368a5b095d63 /src/client/views/nodes/calendarBox
parentfec7f7dd736af3296a2df52acd07f3eadb8123c3 (diff)
parentd4659e2bd3ddb947683948083232c26fb1227f39 (diff)
Merge branch 'master' into lanyi-branch
Diffstat (limited to 'src/client/views/nodes/calendarBox')
-rw-r--r--src/client/views/nodes/calendarBox/CalendarBox.tsx7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/client/views/nodes/calendarBox/CalendarBox.tsx b/src/client/views/nodes/calendarBox/CalendarBox.tsx
index fa863e123..2b20a666d 100644
--- a/src/client/views/nodes/calendarBox/CalendarBox.tsx
+++ b/src/client/views/nodes/calendarBox/CalendarBox.tsx
@@ -24,7 +24,6 @@ type CalendarView = 'multiMonth' | 'dayGridMonth' | 'timeGridWeek' | 'timeGridDa
export class CalendarBox extends CollectionSubView() {
_calendarRef: HTMLDivElement | null = null;
_calendar: Calendar | undefined;
- _oldWheel: HTMLElement | null = null;
_observer: ResizeObserver | undefined;
_eventsDisposer: IReactionDisposer | undefined;
_selectDisposer: IReactionDisposer | undefined;
@@ -194,7 +193,6 @@ export class CalendarBox extends CollectionSubView() {
setTimeout(() => cal?.view.calendar.select(this.dateSelect.start, this.dateSelect.end));
};
- onPassiveWheel = (e: WheelEvent) => e.stopPropagation();
render() {
return (
<div
@@ -218,10 +216,7 @@ export class CalendarBox extends CollectionSubView() {
}}
ref={r => {
this.createDashEventsTarget(r);
- this._oldWheel?.removeEventListener('wheel', this.onPassiveWheel);
- this._oldWheel = r;
- // prevent wheel events from passively propagating up through containers and prevents containers from preventDefault which would block scrolling
- r?.addEventListener('wheel', this.onPassiveWheel, { passive: false });
+ this.fixWheelEvents(r, this._props.isContentActive);
if (r) {
this._observer?.disconnect();