Move the modal to the correct dom node.