Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

➕ REQUEST: Prevent navigation while saving details #127

Open
1 task done
Tracked by #149
viveknigam3003 opened this issue Feb 21, 2022 · 6 comments
Open
1 task done
Tracked by #149

➕ REQUEST: Prevent navigation while saving details #127

viveknigam3003 opened this issue Feb 21, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request Hacktoberfest PRs/Issues for Hacktoberfest Level 2 Intermediate level patches updates. Tech-stack knowledge needed.

Comments

@viveknigam3003
Copy link
Member

Is there an existing issue for this?

  • 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 viveknigam3003 added the enhancement New feature or request label Feb 21, 2022
@viveknigam3003 viveknigam3003 changed the title ➕ REQUEST: Pe ➕ REQUEST: Prevent navigation while saving details Feb 21, 2022
@viveknigam3003 viveknigam3003 self-assigned this Feb 21, 2022
@viveknigam3003 viveknigam3003 removed their assignment Aug 16, 2022
@viveknigam3003 viveknigam3003 added Hacktoberfest PRs/Issues for Hacktoberfest Level 2 Intermediate level patches updates. Tech-stack knowledge needed. labels Oct 8, 2022
@drecali
Copy link
Contributor

drecali commented Oct 18, 2022

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

@viveknigam3003
Copy link
Member Author

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

@developer-diganta
Copy link

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

@merrcury
Copy link
Member

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

@drecali
Copy link
Contributor

drecali commented Oct 28, 2022

@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!

@merrcury
Copy link
Member

@developer-diganta You can pick this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest PRs/Issues for Hacktoberfest Level 2 Intermediate level patches updates. Tech-stack knowledge needed.
Projects
None yet
Development

No branches or pull requests

4 participants