Skip to main content
Topic: bug or quirk on Safari after modal close of Add page (Read 830 times) previous topic - next topic

bug or quirk on Safari after modal close of Add page

I think I found a quirk on Safari after modal close of Add page.

Situation:
On clients/View page I have a subpage financials/list and a modal component with subpage financials/add.
clients/View shows info about 1 client record, ajax is active.
financials/list shows all records of that 1 client.
 
What happens?
To add a new financial record for that client, I click on modal button. Modal opens, new data can be entered, click submit.
On Chrome and Edge, the record is added, the modal closes, backdrop is removed, the clients/View is refreshed, the financials/list subpage shows new record. All is well.
On Safari, the record is added, the modal closes, THE BACKDROP REMAINS, the clients/View is refreshed, the financials/list subpage shows new record. The backdrop only goes away after refreshing the page.

What should happen?
On Safari same behaviour as Chrome.

How does this happen?
I think because the modal is still busy getting closed (in particular the fade out), then the page is refreshed and the modal still tries to clean up after itself. But because the modal is gone, it cannot remove itself completely from view and the backdrop remains.

Possible quick and dirty fixes:
Edit the file \app\views\partials\clients\view.php and remove the fade from the class tag of that particular modal.

Alternative:
Add
Code: [Select]
.fade
{
transition: opacity 0s linear !important;
}
to custom CSS. This changes the duration from 15s to 0s. However, note that this now applies to all modals!