]> git.mxchange.org Git - friendica.git/blobdiff - view/js/main.js
Merge pull request #9731 from MrPetovan/task/various-theme-changes
[friendica.git] / view / js / main.js
index 175f68ca638ca3a4f2e905ef70dcb3a215a3cf3d..a0ffea3718222a8aef9664f0f18eb9a13b92e86d 100644 (file)
@@ -175,6 +175,17 @@ $(function() {
                $(textarea).trigger('change');
        });
 
+       $(".comment-edit-wrapper textarea, .wall-item-comment-wrapper textarea")
+               .editor_autocomplete(baseurl + '/search/acl')
+               .bbco_autocomplete('bbcode');
+
+       // Ensures asynchronously-added comment forms recognize mentions, tags and BBCodes as well
+       document.addEventListener("postprocess_liveupdate", function() {
+               $(".comment-edit-wrapper textarea, .wall-item-comment-wrapper textarea")
+                       .editor_autocomplete(baseurl + '/search/acl')
+                       .bbco_autocomplete('bbcode');
+       });
+
        /* popup menus */
        function close_last_popup_menu() {
                if (last_popup_menu) {
@@ -568,10 +579,6 @@ function updateConvItems(data) {
                commentBusy = false;
                $('body').css('cursor', 'auto');
        }
-       /* autocomplete @nicknames */
-       $(".comment-edit-form  textarea").editor_autocomplete(baseurl + '/search/acl');
-       /* autocomplete bbcode */
-       $(".comment-edit-form  textarea").bbco_autocomplete('bbcode');
 }
 
 function liveUpdate(src) {