onbeforedeactive

Add a description of onbeforedeactive