feat: close modals with browser back button on mobile (#257)
* feat: close modals with browser back button on mobile Create reusable useModalHistory hook that pushes history state when a modal opens and listens for popstate to close it. Apply to ReportModal, ClearMissedConfirm, ExportModal, ImportConfirm, and all modals using ConfirmModal/ShareDialog/Auth/ExportModal base components. Escape key handling was already in place for desktop. Closes #253 * fix: update tests for renamed button labels and missing useModalHistory mock
This commit is contained in:
@@ -41,6 +41,19 @@
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.modal-content.confirm-modal {
|
||||
margin: 0 auto;
|
||||
width: min(100%, 450px);
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.modal-content.confirm-modal {
|
||||
margin: 0 auto;
|
||||
border-radius: 12px;
|
||||
max-height: min(85dvh, 85vh);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideUp {
|
||||
from {
|
||||
opacity: 0;
|
||||
|
||||
Reference in New Issue
Block a user