Ver Fonte

HUE-3613 [editor] Empty div elements are added when scrolling the DB assist panel

Johan Ahlen há 9 anos atrás
pai
commit
c5f1143
1 ficheiros alterados com 4 adições e 1 exclusões
  1. 4 1
      desktop/core/src/desktop/templates/table_stats.mako

+ 4 - 1
desktop/core/src/desktop/templates/table_stats.mako

@@ -169,7 +169,10 @@ from desktop.views import _ko
         var self = this;
         self.params = params;
         var $targetElement = $(element);
-        var $statsContainer = $('<div>').appendTo($('body'));
+        var $statsContainer = $('#statsContainer');
+        if ($statsContainer.length === 0) {
+          $statsContainer = $('<div>').attr('id', 'statsContainer').appendTo($('body'));
+        }
 
         self.i18n = {
           errorLoadingStats: "${ _('There was a problem loading the stats.') }",