Skip to content
Snippets Groups Projects
Commit aabf0535 authored by rhenck's avatar rhenck
Browse files

DropList: Fix touch sorting

For automatic numbering of droplist items another node level 
(div-element) was introduced to the element DOM. Therefore this 
functions needs to look another node further up for it's position.

#694
parent 5f85d46b
No related branches found
No related tags found
No related merge requests found
Pipeline #65826 failed
......@@ -188,7 +188,9 @@ export class DragOperatorService {
private checkHoveredListItem(el: Element | null): void {
const hoveredListItem = el?.closest('.drop-list-item');
if (hoveredListItem) {
const targetIndex = Array.from((hoveredListItem.parentNode as HTMLElement).children).indexOf(hoveredListItem);
const targetIndex =
Array.from(((hoveredListItem.parentNode as HTMLElement).parentNode as HTMLElement).children)
.indexOf((hoveredListItem.parentNode as HTMLElement));
this.positionSortPlaceholder(targetIndex);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment