Posted by kongoji on October 12, 2012 at 6:34am
4 followers
| Project: | More Comments |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi,
I kindly ask you if it would be possible to add a Drupal.attachBehaviors(data) after the ajax load is completed.
That would let other modules' javascripts to attach their behaviors to the new loaded comments.
I attach a patch below.
Thank you
Comments
#1
Here is the patch
#2
+++ b/morecomments.js@@ -14,6 +14,7 @@
+ Drupal.attachBehaviors(data);
Bad indentation. Use spaces instead of tabs please.
#3
rerolling
#4
Fixed line format, reroll
#5
I tested a little bit more the patch and there was still a case where it wouldn't work.
To make behaviors always work we have to attach them on the morecomments-button's parent.
This is the new patch, it works in every case I tested.
#6
Thanks! This also fix #1872792: Problem with ajax_comments.
Committed & Pushed to 7.x-1.x.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.