VE-1178 Track when user clicks back button to leave the editor

I meant to call it deactivate but I can change it if you think it's unclear.