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?
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.