Fixed the getParent hack with TextEditor resizing.

Resolves #24.

Be sure to review closely, as I am not sure this is the best solution to the problem.