Skip to content

feat: Error boundary default refresh always takes top window#4224

Merged
pan-kot merged 1 commit intomainfrom
error-boundary-top-refresh
Feb 4, 2026
Merged

feat: Error boundary default refresh always takes top window#4224
pan-kot merged 1 commit intomainfrom
error-boundary-top-refresh

Conversation

@pan-kot
Copy link
Member

@pan-kot pan-kot commented Feb 4, 2026

Description

When window.location.reload() is called from an error boundary rendered inside an iframe - the reload will cause the iframe, not the entire page, to reload. This can break iframe lifecycle when connected to the parent window via events.

The PR changes that by making the default refresh use the top window, which in not possible for cross-origin iframes, in which case the refresh action is then hidden.

How has this been tested?

  • New unit tests
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.18%. Comparing base (ed20611) to head (e520031).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4224   +/-   ##
=======================================
  Coverage   97.18%   97.18%           
=======================================
  Files         883      884    +1     
  Lines       25869    25882   +13     
  Branches     9345     9349    +4     
=======================================
+ Hits        25140    25153   +13     
  Misses        723      723           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pan-kot pan-kot added this pull request to the merge queue Feb 4, 2026
Merged via the queue into main with commit 83dc705 Feb 4, 2026
49 checks passed
@pan-kot pan-kot deleted the error-boundary-top-refresh branch February 4, 2026 13:59
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