Do not remove a childNode if it is not a child during toTextArea

During implementation, we may sometimes run into the following error:

`````
Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is no longer a child of this node. Perhaps it was moved in a 'blur' event handler? codemirror.js:4640
cm.toTextArea codemirror.js:4640
`````

To avoid this, do not remove a node if it is not a child of that node.

See related SO thread: stackoverflow.com/questions/21926083/failed-to-execute-removechild-on-node