Make dragging a snap-content view much more performant on mobile

Doing a string replacement and updating the classname of the dragged element whenever action.drag.dragging is called causes a lot of stuttering on mobile—performing a check for whether a class is still attached to the element, and making sure it still exists before trying to remove it, prevents this stuttering from occurring.