diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js
index 9dfa915c3d71b649ef888efaf18d94dc1c28449e..b6f90e60dbe56fbca464ce64aaae048b3031ab1d 100644
--- a/themes/bootstrap3/js/record.js
+++ b/themes/bootstrap3/js/record.js
@@ -110,6 +110,9 @@ function registerAjaxCommentRecord() {
     })
     .done(function addCommentDone(/*response, textStatus*/) {
       var $tab = $(form).closest('.list-tab-content');
+      if (!$tab.length) {
+        $tab = $(form).closest('.tab-pane');
+      }
       refreshCommentList($tab, id, recordSource);
       $(form).find('textarea[name="comment"]').val('');
       $(form).find('input[type="submit"]').button('loading');