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()
This commit is contained in:
Simon Grim 2016-03-21 23:53:51 +05:00
parent 08856095b0
commit 21ee46a466

View File

@ -88,7 +88,7 @@ function postToElem(post, kind, promoted) {
} }
// Now create the html elements // Now create the html elements
var elem = $.MAL.getPostTemplate().clone(true); var elem = $.MAL.getPostTemplate().clone(true).appendTo(twister.html.detached);
elem.removeAttr('id') elem.removeAttr('id')
.addClass(kind) .addClass(kind)
.attr('data-time', time) .attr('data-time', time)