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

Add setTimeout back to unstable_usePrompt #10718

Merged
merged 3 commits into from
Jul 19, 2023
Merged

Conversation

brophdawg11
Copy link
Contributor

@brophdawg11 brophdawg11 commented Jul 19, 2023

Add back in the setTimeout that was removed in #10687 since it causes issues with navigate(-1). This wasn't specifically removed to fix anything in the original bug.

I wasn't able to get a unit test exposing this though because it seems to be some sort of race between window.history and window.confirm where the window.history revert operation doesn't land until after the window.confirm. This doesn't happen in a unit test with a mocked window.confirm.

Closes #10714

@changeset-bot
Copy link

changeset-bot bot commented Jul 19, 2023

🦋 Changeset detected

Latest commit: e4a366f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
react-router-dom Patch
react-router Patch
react-router-dom-v5-compat Patch
react-router-native Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brophdawg11 brophdawg11 linked an issue Jul 19, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: unstable_usePrompt issue with navigate(-1)
1 participant