Exiting Event not Triggered when exiting document

When you exit a field the exiting event seems to trigger fine except if you go directly to “save and close”. In that case Querysave of the document is triggered but the exiting event is forgotten. Anybody have a solution. I want to set a hidden date field whenever the field value is changed to a specific value.