Fix an issue with the drag and drop functionality on the planner page.

This commit is contained in:
DESKTOP-T0O5CDB\DESK-555BD
2024-11-17 11:02:11 -07:00
parent c5a5de50a7
commit d8e06fd968

View File

@@ -270,10 +270,10 @@ function dragOver(event) {
event.preventDefault();
}
function dropBox(event, newProgress) {
if ($(event.target).hasClass("swimlane")) {
if (dragged.parentElement != event.target && event.target != dragged) {
updatePlanRecordProgress(newProgress);
}
var targetSwimLane = $(event.target).hasClass("swimlane") ? event.target : $(event.target).parents(".swimlane")[0];
var draggedSwimLane = $(dragged).parents(".swimlane")[0];
if (targetSwimLane != draggedSwimLane) {
updatePlanRecordProgress(newProgress);
}
event.preventDefault();
}