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 useWarnOnPageUnload hook #1676

Merged
merged 1 commit into from
Aug 22, 2024
Merged

Add useWarnOnPageUnload hook #1676

merged 1 commit into from
Aug 22, 2024

Conversation

robertknight
Copy link
Member

@robertknight robertknight commented Aug 22, 2024

This hook provides a convenient way to enable a browser warning if the user tries to close the tab while there are unsaved changes.

This hook and its tests were copied verbatim from the hypothesis/lms repo.

This hook provides a convenient way to enable a browser warning if the user
tries to close the tab while there are unsaved changes.

This hook was copied verbatim from the hypothesis/lms repo.
@robertknight robertknight requested a review from acelaya August 22, 2024 12:00
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (38cf17b) to head (7c7e3e3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1676   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           61        62    +1     
  Lines         1067      1077   +10     
  Branches       415       417    +2     
=========================================
+ Hits          1067      1077   +10     

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

@robertknight robertknight merged commit 276ed59 into main Aug 22, 2024
4 checks passed
@robertknight robertknight deleted the use-warn-on-page-unload branch August 22, 2024 12:19
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