From 649e34f66e6adb2bda0444cbc2ec977c0925315d Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Wed, 25 May 2022 20:13:13 -0800 Subject: [PATCH] add touch support for mealplanner (#1295) --- frontend/pages/group/mealplan/planner.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/pages/group/mealplan/planner.vue b/frontend/pages/group/mealplan/planner.vue index 86ba1defe68f..da333054fa9c 100644 --- a/frontend/pages/group/mealplan/planner.vue +++ b/frontend/pages/group/mealplan/planner.vue @@ -147,7 +147,7 @@ - + {{ $globals.icons.delete }} @@ -291,10 +291,12 @@ export default defineComponent({ } function onMoveCallback(evt: SortableEvent) { + const supportedEvents = ["drop", "touchend"]; + // Adapted From https://github.com/SortableJS/Vue.Draggable/issues/1029 const ogEvent: DragEvent = (evt as any).originalEvent; - if (ogEvent && ogEvent.type !== "drop") { + if (ogEvent && ogEvent.type in supportedEvents) { // The drop was cancelled, unsure if anything needs to be done? console.log("Cancel Move Event"); } else {