Fix IOS opening in safari on wrapped proxy errors attempt 2#75
Merged
Fix IOS opening in safari on wrapped proxy errors attempt 2#75
Conversation
This reverts commit 58cfe1f.
dajinchu
requested changes
Feb 17, 2026
| // window.location.href = resp.url; | ||
| await hardRedirect(resp.url); | ||
| // window.location.reload(); | ||
| window.Turbolinks.controller.adapter.pageInvalidated(); |
Collaborator
There was a problem hiding this comment.
doesn't really matter but mergeHead calls
window.Turbolinks.controller.viewInvalidated(); instead and I think we match that
| if (!resp.ok) { | ||
| await hardRedirect(resp.url); | ||
| return; | ||
| throw redirect(resp.url); |
Collaborator
There was a problem hiding this comment.
i think we could invalidate here too?
1072817 to
289d3ce
Compare
289d3ce to
934830c
Compare
dajinchu
reviewed
Feb 17, 2026
| history.pushState(null, "", resp.url); | ||
| window.Turbolinks.controller.viewInvalidated(); | ||
| // stop vike rendering to let navigation happen | ||
| await new Promise(() => {}); |
Collaborator
There was a problem hiding this comment.
could extract into hardNavigate func
dajinchu
approved these changes
Feb 17, 2026
dajinchu
approved these changes
Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Another attempt at #73.
The original approach did not work since the IOS apps open all window.location.href in a new safari browser (I had a misunderstanding of that behavior). Calling
window.location.reload()should do a full page reload which is the intent of callingwindow.location.href = resp.url.Just review 934830c, the other commit is a revert.