Skip to content

Fix IOS opening in safari on wrapped proxy errors attempt 2#75

Merged
reinabo merged 3 commits intomasterfrom
rt/fix-ios-wrapped-again
Feb 17, 2026
Merged

Fix IOS opening in safari on wrapped proxy errors attempt 2#75
reinabo merged 3 commits intomasterfrom
rt/fix-ios-wrapped-again

Conversation

@reinabo
Copy link
Contributor

@reinabo reinabo commented Feb 17, 2026

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 calling window.location.href = resp.url.

Just review 934830c, the other commit is a revert.

@reinabo reinabo requested a review from dajinchu February 17, 2026 15:52
@reinabo reinabo changed the title Rt/fix ios wrapped again Fix IOS opening in safari on wrapped proxy errors Feb 17, 2026
// window.location.href = resp.url;
await hardRedirect(resp.url);
// window.location.reload();
window.Turbolinks.controller.adapter.pageInvalidated();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we could invalidate here too?

@reinabo reinabo requested a review from dajinchu February 17, 2026 15:58
@reinabo reinabo force-pushed the rt/fix-ios-wrapped-again branch from 1072817 to 289d3ce Compare February 17, 2026 16:19
@reinabo reinabo force-pushed the rt/fix-ios-wrapped-again branch from 289d3ce to 934830c Compare February 17, 2026 16:21
@reinabo reinabo changed the title Fix IOS opening in safari on wrapped proxy errors Fix IOS opening in safari on wrapped proxy errors again Feb 17, 2026
@reinabo reinabo changed the title Fix IOS opening in safari on wrapped proxy errors again Fix IOS opening in safari on wrapped proxy errors attempt 2 Feb 17, 2026
history.pushState(null, "", resp.url);
window.Turbolinks.controller.viewInvalidated();
// stop vike rendering to let navigation happen
await new Promise(() => {});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could extract into hardNavigate func

@reinabo reinabo requested a review from dajinchu February 17, 2026 16:35
@reinabo reinabo merged commit c3f35bb into master Feb 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants