Skip to content

Commit

Permalink
Don't append to existing inline descriptions.
Browse files Browse the repository at this point in the history
This issue only happened when using HTML markup, since it didn't generate a
wrapping tag.

Fixes bug 2615.
  • Loading branch information
julen committed Dec 27, 2012
1 parent 9effaec commit 8908e02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pootle/static/js/admin.js
Expand Up @@ -88,12 +88,13 @@ $(function () {
type: 'POST',
data: $(this).serializeObject(),
success: function (data) {
var $metaDescContent = $metaDesc.children().filter(':first');
var $metaDescContent = $metaDesc.children().filter(':first'),
theHtml = $('<div>').append(data.description_html);

$editMetaDesc.hide();
$editMetaDesc.html(data.form);

$metaDescContent.replaceWith(data.description_html);
$metaDescContent.replaceWith(theHtml);
$metaDesc.show();

$('.markup-body').filter(':not([dir])').bidi();
Expand Down

0 comments on commit 8908e02

Please sign in to comment.