Dialog with 'yes/no/cancel' when tab closes

A little bit ugly, but that’s the way to go within this callback
madness.