kirbydesign / designsystem

Kirby Design System
https://cookbook.kirby.design
MIT License
82 stars 22 forks source link

[BUG] Modal with alert callback not closing on browser navigation #3430

Closed RasmusTraeholt closed 2 weeks ago

RasmusTraeholt commented 3 months ago

Describe the bug

On web if you open a modal that implements an alert callback (canDismiss) it does not close correctly when using browser back/forward

Describe how to reproduce the bug

  1. Open any modal that implements an alert callback
  2. Navigate using browser back/forward
  3. See that the page changes behind the modal but the modal does not close

Which Kirby version was used?

## What was the expected behavior? The modal should close when changing page/route regardless of the alert callback implementation OR browser navigation is disabled (stopped) when an alert callback is present ## Add any screenshots ## Please complete the following information: - Any browser with access to back/forward navigation ## Are there any additional context?

Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Verification

To make sure the bug is not intended behaviour; it should be verified by a member of team Kirby before moving on to implementation.

Implementation

The contributor who wants to implement this issue should:

Review

Once the issue has been implemented and is ready for review: