From d9e8de6969510a0936a5655082be0ee9aeded363 Mon Sep 17 00:00:00 2001 From: dmitrykurmanov Date: Wed, 21 Feb 2024 16:46:45 +0400 Subject: [PATCH] work for the https://github.com/surveyjs/survey-library/issues/7893 --- src/dragdrop/ranking-select-to-rank.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dragdrop/ranking-select-to-rank.ts b/src/dragdrop/ranking-select-to-rank.ts index 63a4628aa3..d60ef552e1 100644 --- a/src/dragdrop/ranking-select-to-rank.ts +++ b/src/dragdrop/ranking-select-to-rank.ts @@ -10,13 +10,15 @@ export class DragDropRankingSelectToRank extends DragDropRankingChoices { return dragOverNode; } - if (this.parentElement.isEmpty()) { + if ( + this.parentElement.rankingChoices.length === 0 || + this.parentElement.unRankingChoices.length === 0 + ) { let toContainer: HTMLElement = dragOverNode.closest("[data-ranking='to-container']"); let fromContainer: HTMLElement = dragOverNode.closest("[data-ranking='from-container']"); if (!!toContainer) return toContainer; if (!!fromContainer) return fromContainer; - return null; } return super.findDropTargetNodeByDragOverNode(dragOverNode);