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

fix: make Modal's onRequestClose mandatory and call it on close #602

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

targos
Copy link
Member

@targos targos commented Dec 13, 2023

BREAKING-CHANGE: Modal's and ConfirmModal's onRequestClose is now mandatory.
Note that a Modal has to always be closed (isOpen must be set to false) when onRequestClose is called.
This is driven by a change in the HTML spec that ensures a web page cannot indefinitely keep a dialog open.
See whatwg/html#9462 and https://bugs.chromium.org/p/chromium/issues/detail?id=1511166#c1

BREAKING-CHANGE: Modal's and ConfirmModal's `onRequestClose` is now mandatory.
Note that a Modal has to always be closed (`isOpen` must be set to `false`) when `onRequestClose` is called.
This is driven by a change in the HTML spec that ensures a web page cannot indefinitely keep a dialog open.
See whatwg/html#9462 and https://bugs.chromium.org/p/chromium/issues/detail?id=1511166#c1
Copy link

cloudflare-workers-and-pages bot commented Dec 13, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: db25587
Status: ✅  Deploy successful!
Preview URL: https://3f4c9652.react-science.pages.dev
Branch Preview URL: https://fix-modal.react-science.pages.dev

View logs

@codecov-commenter
Copy link

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (63f093b) 24.49% compared to head (db25587) 24.50%.

Files Patch % Lines
src/components/modal/useDialog.ts 30.00% 7 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #602   +/-   ##
=======================================
  Coverage   24.49%   24.50%           
=======================================
  Files         223      223           
  Lines       12954    12954           
  Branches      234      234           
=======================================
+ Hits         3173     3174    +1     
+ Misses       9693     9692    -1     
  Partials       88       88           

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

@targos targos merged commit e3f753f into main Dec 13, 2023
12 checks passed
@targos targos deleted the fix-modal branch December 13, 2023 15:40
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