themotte / rDrama

This code runs https://www.themotte.org. Forked from https://github.com/Aevann1/rDrama
GNU Affero General Public License v3.0
25 stars 31 forks source link

User cards won't show up in some cases #612

Closed justcool393 closed 1 year ago

justcool393 commented 1 year ago

steps to repro:

  1. make a comment
  2. click on your username in the replied comment
  3. observe the user card doesn't show up
TLSM commented 1 year ago

I recall we had this issue on upstream. Think the issue is the popup user card is from Bootstrap, which only attaches listeners on document ready and thus does not on elements added to the DOM late. This is mitigated elsewhere through explicit calls to bs_trigger(element) on the newly added element. Probably just need to do the same in comments_v.js:post_comment. Right now we seem to be doing it on the comment submission form, whereas this was previously fixed on upstream by calling bs_trigger on the element with id 'replies-of-' + fullname