0

When I try to move a SVG object it work's not when using removeChild(). It blocks also the touchmove event when moving.

Pseudocode:

id.addEventListener("touchmove", function(e) {
  if (selected == true) {
    e.preventDefault();
    moveY = y;
    var n = document.getElementById("test"); // remove nodes
    while (n.lastChild) {
     n.removeChild(n.lastChild);
    }
    test.appendChild(createElementNS...); // add it again
  }
}, false);
JCss
  • 99
  • 9

1 Answers1

1

It is not a problem of SVG but of suppression of the element. messages do not arrive anymore. Look Touch Move event don't fire after Touch Start target is removed The problem is described and solutions are proposed

Emmanuel
  • 11
  • 1