Issue Bug Closed

#94219current modal state handling is bogus

Andreas Kienast 05/27/21, 20:57 updated 09/07/21, 07:40

Description

Our modal implementation has an internal state handling to determine which modal is the current one if multiple modals get rendered. The new “current” modal is determined once a previous modal is closed, this happens on the hidden.bs.modal event. However, this will break the next modal in case modal A gets closed and triggers modal B:

  • if modal A is visible, the stack contains 1 item
  • if modal A gets removed, the stack still contains 1 item as long the modal is not completely destroyed
  • while modal A gets removed, modal B is rendered, which lets the stack contain 2 items now
  • once modal A is removed, the last item is removed from the stack, which represents modal B

Reviews 2