antoniandre / vue-cal

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

@event-delete not working on mobile devices? #509

Open tkloy24 opened 1 year ago

tkloy24 commented 1 year ago

It seems like the @event-delete is not getting fired on mobile devices with Chrome-based browsers. When tapping long on an event it is directly getting removed from the calender without showing the "Delete" text.

I added a console.log statement to my deleteEvent function and could verify that it is not getting called when using a mobile device.

Calendar: ` <vue-cal ref="vuecal" :time-from="this.calendarUserOptions.startHour 60" :time-to="this.calendarUserOptions.endHour 60" locale="de" :disable-views="['years', 'year']" :editable-events="{ title: false, drag: true, resize: true, delete: true, create: true, class: 'bg-accent text-white', }" :snap-to-time="30" :drag-to-create-threshold="0" :events="events" @event-drag-create="addEvent($event)" @event-delete="deleteEvent($event)" @event-drop="changeEvent($event)"

`

Method to delete: deleteEvent: function (event) { // Find event in events array let index = this.events.findIndex((e) => e._eid === event._eid); // Remove event this.events.splice(index, 1); },