Warn before navigating away from the page.