Data-discard-confirmation does not work

Let me know if the above helped folks or if I can clarify anything, just checking back on some older threads :slight_smile:

It seems that you can pretty consistently evade the save bar page-leaving detection, by clicking on an breadcrumb. This can be replicated using the back button as well, though it is less consistent.

The flow looks like: Arrive at dashboard > Go to resource page > Make a change > Click breadcrumb or use back button (without saving) > Arrive at dashboard with CSB still showing at the top.

Thanks for following up on this, @Alan_G

The main issue is that the data-save-bar attribute just isn’t playing nice when the form is nested inside a full-size modal—check your own video which you shared at start.

As a workaround, I’m going to try rendering a standalone ui-save-bar component directly on the route. My plan is to:

  • Manually trigger its visibility based on state changes within the modal.

  • Ensure the bar hides properly whenever the modal is closed.

I’ll give this a shot and report back once I see how it handles.