function keepOriginalElementInDom() {
            const {items: itemsNow} = config;
            if (!draggedEl.parentElement && (!itemsNow[originIndex] || draggedElData[ITEM_ID_KEY] !== itemsNow[originIndex][ITEM_ID_KEY])) {
                document.body.appendChild(draggedEl);
                // to prevent the outline from disappearing
                draggedEl.focus();
                watchDraggedElement();
                hideOriginalDragTarget(originalDragTarget);
                document.body.appendChild(originalDragTarget);
            } else {
                window.requestAnimationFrame(keepOriginalElementInDom);
            }
        }
// We will keep the original dom node in the dom because touch events keep firing on it, we want to re-add it after the framework removes it
We will keep the original dom node in the dom because touch events keep firing on it, we want to re-add it after the framework removes it
We will keep the original dom node in the dom because touch events keep firing on it we want to re - add it after the framework removes it
function keepOriginalElementInDom() {
            const {items: itemsNow} = config;
            if (!draggedEl.parentElement && (!itemsNow[originIndex] || draggedElData[ITEM_ID_KEY] !== itemsNow[originIndex][ITEM_ID_KEY])) {
                document.body.appendChild(draggedEl);
                draggedEl.focus();
                watchDraggedElement();
                hideOriginalDragTarget(originalDragTarget);
                document.body.appendChild(originalDragTarget);
            } else {
                window.requestAnimationFrame(keepOriginalElementInDom);
            }
        }
function keepOriginalElementInDom ( ) { const { items : itemsNow } = config ; if ( ! draggedEl . parentElement && ( ! itemsNow [ originIndex ] || draggedElData [ ITEM_ID_KEY ] !== itemsNow [ originIndex ] [ ITEM_ID_KEY ] ) ) { document . body . appendChild ( draggedEl ) ; draggedEl . focus ( ) ; watchDraggedElement ( ) ; hideOriginalDragTarget ( originalDragTarget ) ; document . body . appendChild ( originalDragTarget ) ; } else { window . requestAnimationFrame ( keepOriginalElementInDom ) ; } }
We will keep the original dom node in the dom because touch events keep firing on it, we want to re-add it after the framework removes it
We will keep the original dom node in the dom because touch events keep firing on it we want to re - add it after the framework removes it
// to prevent the outline from disappearing