antoniandre / vue-cal

A Vue.js full calendar, no dependency, no BS. :metal:
https://antoniandre.github.io/vue-cal/
MIT License
1.24k stars 238 forks source link

Press and hold deletes event on mobile #576

Open GinJus opened 4 months ago

GinJus commented 4 months ago

I am currently using Vue-cal 4.8.1 with Vue 3.4.27.

In the 'day' view, when I press and hold on an event, it triggers a deletion action. I can't figure out which function is being used; none of the on-event functions are called.

I am unable to replicate the same issue on a desktop.

GinJus commented 4 months ago

I feel quite embarrassed. After spending hours trying to figure it out, I discovered the problem just 2 minutes after posting this.

I have a dynamic object bound to :editable-events="eventConfig". When switching views (from week to day), there are different privileges.

The 'delete' functionality doesn't seem to be responding to this change (resize and drag are working). Could this still be considered a bug?

This function is triggered upon view change:

        onViewChange(newView) {
            this.currentView = newView.view;
            this.startDate = newView.startDate;
            if(newView.view === 'day'){
                this.eventConfig = { title: false, drag: true, resize: true, delete: false, create: true };
            } else {
                this.eventConfig = { title: false, drag: false, resize: false, delete: false, create: false };
            }
        },