bryntum / support

An issues-only repository for the Bryntum project management component suite which includes powerful Grid, Scheduler, Calendar, Kanban Task Board and Gantt chart components all built in pure JS / CSS / TypeScript
https://www.bryntum.com
54 stars 6 forks source link

CalendarHighlight + begin/end batch issue #6815

Open marciogurka opened 1 year ago

marciogurka commented 1 year ago

Forum post

Hello Bryntum team,

It seems that there's a glitch when dragging an event whenever the context of the drag becomes invalid.

Follow the config I've used to reproduce the issue:

features : {
        calendarHighlight : {
            calendar : 'event',
        },
    },

Then I am simulating a case where I make the context.valid false:

beforeEventDropFinalize({ context, ...e }) {
            context.valid = false;
            context.eventRecord.eventStore.beginBatch();
            context.eventRecord.eventStore.endBatch();
        }

The issue happens whenever I try to perform a begin/end batch while having the calendarHighlight feature set.

To reproduce the glitch:

Try to move an event to a different timespan (it will jump back to its original position as context.valid is false) Zoom out The event "disappeared". But the truth is that it jumped far away to the right. If I try to move that event again, it will jump back to the original position.

drag-from-grid-begin-batch-issue.zip

marciogurka commented 1 year ago

The user confirmed that still happens on the latest release (5.3.5)