From 21ee46a466cb6333aebd307a1e49d2a8c339680a Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Mon, 21 Mar 2016 23:53:51 +0500 Subject: [PATCH] add appending of twists' elements to twister.html.detached immediately after creation to be able to select them via getElem() in situation where they are not selected because not appended yet to body e.g. it fixes case when fetched short URIs can't be applied on twists which are created in newConversationModal() --- js/twister_formatpost.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/twister_formatpost.js b/js/twister_formatpost.js index 6dcc8bd..21a780b 100644 --- a/js/twister_formatpost.js +++ b/js/twister_formatpost.js @@ -88,7 +88,7 @@ function postToElem(post, kind, promoted) { } // Now create the html elements - var elem = $.MAL.getPostTemplate().clone(true); + var elem = $.MAL.getPostTemplate().clone(true).appendTo(twister.html.detached); elem.removeAttr('id') .addClass(kind) .attr('data-time', time)