marijnh/CodeMirror — pull request #1179 by jochenberger (2013-01-24 07:17:06+00:00)
Title: Improve the check for whether the CodeMirror should be cleaned up

When checking whether the wrapper element is still part of the DOM, check all the way up to the document body.
Currently, when removing an ancestor of the wrapper element from the DOM which is not its parent, the `resizeHandler` is not unregistered.