When a window is closed, it needs to call endEditing() on the active detail editor to prevent binding issues.
When a window is closed, it needs to call endEditing() on the active detail editor to prevent binding issues.