Does anyone find a solution for adding onbeforeunload when editing a resource , to prevent dirty form data loose ?