Hi,
We have drag and drop from an outside list of items working currently, but it does not work for touch devices. It is an Angular 17 app. Pretty straightforward code. We add draggable=“true” to list of items to drag, and then add event listeners to the document to handle the drop.
document.addEventListener("dragover", function (event) {
// prevent default to allow drop
let e: any = event;
// console.log(e.target.parentElement.parentElement.classList);
if (e.target.parentElement.classList.contains("dhx_cal_data") || e.target.parentElement.classList.contains("dhx_scale_holder_now") || e.target.classList.contains("schedule-block"))
event.preventDefault();
}, false);
document.addEventListener("drop", function (event) {
var action_data = that.scheduler.getActionData(event);
let e: any = event;
if (e.target.parentElement.classList.contains("dhx_cal_data") || e.target.parentElement.classList.contains("dhx_scale_holder_now") || e.target.classList.contains("schedule-block")) {
...
What is the best way to get this working with touch?
Thanks,
Larry