Port totalHeight() and fix inline editor sizing issues