}
if(event.type === 'nodeMoved') {
- /* globals Node */
- if(event.meta.node.nodeType === Node.TEXT_NODE) {
- actionArg = utils.getElementForTextNode(event.meta.node);
- } else {
- actionArg = utils.getElementForNode(event.meta.node);
+ actionArg = utils.getElementForNode(event.meta.node, event.meta.parent);
+ if(actionArg.sameNode(referenceElement)) {
+ referenceElement = this.children()[nodeIndex];
}
} else {
actionArg = event.meta.node;