Accordions Interfering w/ Back Button

We’ve noticed that clicking on an accordion prevents a user from being able to use the back button to navigate to the previous page without multiple clicks. Is there a way to make it so that opening an accordion doesn’t interfere with the use of the back button?

Thanks!

1 Like

Hi,

one of my clients pointed out the same issue to me.

Looking at the event code of the div-wrapper I noticed that the behaviour appears to be intentional or a side effect of some other functionality?

The whole function looks like this and can be found in assets/js/bricks.min.js:

function(t) {
  var n = t.target.closest(".accordion-title-wrapper");
  if (n) {
    var s = n.parentNode;
    if (s) {
      var l = s.querySelector(".accordion-content-wrapper");
      if (l) {
        if (t.stopPropagation(), !c) {
          var d = e.querySelectorAll(".brx-open");
          d.length && d.forEach((function(e) {
            var t = e.querySelector(".accordion-content-wrapper");
            t && t !== l && i(t, a)
          }))
        }
        var u = !s.classList.contains("brx-open");
        o && u ? history.pushState("", document.title, window.location.pathname + o) : history.pushState("", document.title, window.location.pathname + window.location.search), r(l, a)
      }
    }
  }
}

I was wondering what might be the reason for this behaviour as well, as I find it undesirable.

Thanks in advance for looing into it.

I think this is a bug and maybe the same like in the Nestable Tabs:

Cheers

Patric