Avoid exception when editing values with no clientRects

Originally by Thomas Andersen, see issue 6884.