Fix user popovers failing from early bs_trigger.

Very strange bug, and I hope this fixes it. User popovers, e.g. on
comments pages when names are clicked, spontaneously stopped working
on my local instance. This parallels occasional reports from others
that their popovers stop working for seemingly no reason.

The primary symptom appeared to be in comments+submission_listing.js
@ popclick(...), which became unable to find any `.popover` elements
in the document, resulting in a console error. Running `bs_trigger(
document)` manually in console after page load always fixed this.
As such, I am assuming this is (hopefully) a timing bug from the
bs_trigger call in header.js running before document ready. The call
now runs on a standard document ready callback boilerplate.
May God have mercy on our souls if this doesn't fix it.
I discovered that running `bs_trigger(document)`
master
Snakes 2022-05-18 01:46:14 -04:00
parent f0c9a354e9
commit 38680fd38c
1 changed files with 1 additions and 1 deletions

View File

@ -266,7 +266,7 @@
</div>
</nav>
<script src="/assets/js/header.js?v=265"></script>
<script src="/assets/js/header.js?v=266"></script>
{% if v and not err %}
<div id="formkey" class="d-none">{{v.formkey}}</div>