Warn user about unsaved changes and allow them to remain on page if they try to navigate away.