Platforms: Unix X11 and Windows
Example to reproduce
% pack .e
% bind .e <FocusIn> {puts "%W <FocusIn> %d: [.e state]"}
% bind .e <FocusOut> {puts "%W <FocusOut> %d: [.e state]"}
% bind .e <Return> {.e state invalid}
After pressing Return inside the field and focussing outside the entryfield,
the state invalid is lost.
It also happens if you set state invalid from the console and focus into the entryfield.