Better fix to getParent resize hack.

Far better fix to the getParent().getParent() hack to resize the TextEditor.