makemd icon indicating copy to clipboard operation
makemd copied to clipboard

Dragging an event over the top boundary of a day on "Week View" crashes the plugin

Open Italo-Vieira opened this issue 1 month ago • 1 comments

On "Day View" this is handled gracefully but on "Week View" crashes the plugin, the video below shows it better

https://github.com/user-attachments/assets/599f6ab5-fd9a-4921-8867-3fab8294cf07

Italo-Vieira avatar Nov 20 '25 22:11 Italo-Vieira

It seems the root cause is because in the AllDayCell (used in WeekView) no value is set for the "data" parameter of the useDroppable function. https://github.com/Make-md/makemd/blob/1929944e9234dacba330145c025b17312febd3cd/src/core/react/components/SpaceView/Contexts/CalendarView/WeekView/AllDayCell.tsx#L18-L20

So when the onDropOver listener is triggered, the data field is null, since there is no null check an exception is raised which breaks the plugin. https://github.com/Make-md/makemd/blob/1929944e9234dacba330145c025b17312febd3cd/src/core/react/components/SpaceView/Frames/ViewNodes/FrameEditorInstance.tsx#L59-L71 https://github.com/Make-md/makemd/blob/1929944e9234dacba330145c025b17312febd3cd/src/core/react/components/Explorer/PropertiesView.tsx#L261-L265

The DayView works because it set's up the all day cell in a different way and passes values on the data parameter https://github.com/Make-md/makemd/blob/1929944e9234dacba330145c025b17312febd3cd/src/core/react/components/SpaceView/Contexts/CalendarView/DayView/DayView.tsx#L385-L388

Italo-Vieira avatar Nov 21 '25 10:11 Italo-Vieira