Merge "Ensure batch edit mode is ended on window focus loss"