Save the position on closing rather than onclosed (no parent when in onclosed)