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

back button bug fix #1077

Merged
merged 3 commits into from
Oct 30, 2023
Merged

back button bug fix #1077

merged 3 commits into from
Oct 30, 2023

Conversation

shandilya3
Copy link
Collaborator

@shandilya3 shandilya3 commented Oct 30, 2023

Description

createRedirect util method is using replace() that means the current page will not be saved in session history, meaning the user won't be able to use the back button to navigate to the page from where it came.

Fix:
added a second optional parameter named preserveHistory to the createRedirect method. That parameter value default to false. That way existing functionality is the same, but in the place where need to go back to the page where user came we can pass in true as the second parameter.

Related Issue

Motivation and Context

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA or I'm an Adobe employee.
  • I have made any necessary test changes and all tests pass.
  • I have run the Sandbox successfully.

@shandilya3 shandilya3 changed the title navigate back to the previous page using the browser's history. back button bug fix Oct 30, 2023
@carterworks carterworks added the ignore-for-release Do not include this PR in release notes label Oct 30, 2023
@shandilya3 shandilya3 merged commit f8e5883 into main Oct 30, 2023
1 check passed
@shandilya3 shandilya3 deleted the backButtonBugFix branch October 30, 2023 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-for-release Do not include this PR in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants