resuminator icon indicating copy to clipboard operation
resuminator copied to clipboard

➕ REQUEST: Prevent navigation while saving details

Open viveknigam3003 opened this issue 3 years ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your feature request related to a problem? Please describe.

When users are typing their details, the resuminator keeps saving their work automatically, but sometimes by accident, they may navigate to some other page while the save process is going on.

Describe the solution you'd like

We need to implement an onbeforeunload handler for the "Create" page window to prevent these accidental navigations.

Describe alternatives you've considered

No response

Additional context

No response

viveknigam3003 avatar Feb 21 '22 03:02 viveknigam3003

Hi @viveknigam3003, I'd like to work on this task. Can you please assign it to me?

drecali avatar Oct 18 '22 17:10 drecali

Sure @drecali! Let me know if you face any issues while setting up a local instance

viveknigam3003 avatar Oct 18 '22 17:10 viveknigam3003

Hi @viveknigam3003 Is the issue still open? If so, then can I please work on it?

developer-diganta avatar Oct 27 '22 05:10 developer-diganta

Hi, @drecali If you are still working on this issue. Please let us know.

merrcury avatar Oct 27 '22 11:10 merrcury

@merrcury I think it's best to let @developer-diganta work on this issue.

To give some background, I tried the naive approach of just adding an onbeforeunload event listener, but it only worked if refreshing the page, navigating to a different URL, or using the Back or Fwd buttons. It did not work when clicking on other Menu navigation buttons. I think this is because of Next.js routing overriding the browser's native navigation behavior.

I think the solution should conditionally apply an onbeforeunload listener but also handle Next.js routing behavior. I hope this helps!

drecali avatar Oct 28 '22 05:10 drecali

@developer-diganta You can pick this up.

merrcury avatar Oct 28 '22 06:10 merrcury