moved toggleelement to register_new_elements() #111

Merged
Aevann merged 1 commits from :fix-view-more-comments-comment-reports-not-interactive into master 2023-02-06 02:07:19 +00:00

We currently cannot see (toggle the dropdown/button) reports that are hidden behind the "show more" (comments) button. This PR fixes that.

Example of what is happening without this PR:

  1. open megathread. The thread is long includes hundreds of comments implying need to click "show more" (comments) button
  2. without clicking any "show more" (comments) button, click the flaggers button on one of the first comments
  3. flaggers are presented as expected
  4. click the "show more" (comments) button at the end
  5. click the flaggers button on one of the comments that was hidden behind the "show more" (comments) button
  6. the button does nothing and has no event listenner associated

With this PR:

  1. all flaggers buttons work regardless if hidden behind "Show More" (comments) or not. Tested up to two "Show More" (comments) buttons

I did the PR this way because the view_more button calls register_new_elements() and not bottom.js as a whole

There are other things using data-toggleelement like the undelete button on comments and the Preview button on /submit. Both of those still work as expected

We currently cannot see (toggle the dropdown/button) reports that are hidden behind the "show more" (comments) button. This PR fixes that. Example of what is happening without this PR: 1. open megathread. The thread is long includes hundreds of comments implying need to click "show more" (comments) button 2. without clicking any "show more" (comments) button, click the flaggers button on one of the first comments 3. flaggers are presented as expected 4. click the "show more" (comments) button at the end 5. click the flaggers button on one of the comments that was hidden behind the "show more" (comments) button 6. the button does nothing and has no event listenner associated With this PR: 1. all flaggers buttons work regardless if hidden behind "Show More" (comments) or not. Tested up to two "Show More" (comments) buttons I did the PR this way because the view_more button calls register_new_elements() and not bottom.js as a whole There are other things using data-toggleelement like the undelete button on comments and the Preview button on /submit. Both of those still work as expected
mummified-corroding-granny added 1 commit 2023-02-04 00:51:13 +00:00
Aevann merged commit 786ba6aa56 into master 2023-02-06 02:07:19 +00:00
Sign in to join this conversation.
There is no content yet.