More robust height calculation in messageParent()

check against scrollHeight in addition to offsetHeight when calculating height for messaging to parent