Repetitive floatThead initialization-destruction produces a DOM leakage
weekens opened this issue · 3 comments
weekens commented
To reproduce, just initialize-destroy floatThead several times:
for (var i = 0; i < 10; i++) {
$statTable.floatThead({
scrollContainer: function($t) {
return $t.closest("div");
}
});
$statTable.floatThead("destroy");
}
This will produce something like:
<div class="floatThead-wrapper" style="position: relative; clear:both;">
<div class="floatThead-wrapper" style="position: relative; clear:both;">
<div class="floatThead-wrapper" style="position: relative; clear:both;">
<div class="floatThead-wrapper" style="position: relative; clear:both;">
<div class="floatThead-wrapper" style="position: relative; clear:both;">
<div class="floatThead-wrapper" style="position: relative; clear:both;">
<div class="floatThead-wrapper" style="position: relative; clear:both;">
<div class="floatThead-wrapper" style="position: relative; clear:both;">
<div class="floatThead-wrapper" style="position: relative; clear:both;">
<div class="floatThead-wrapper" style="position: relative; clear:both;">
<div class="floatThead-wrapper" style="position: relative; clear:both;">
<div class="stat" tabindex="5005" style="overflow: hidden; outline: none;">
<table class="table" style="min-width: 1924px; table-layout: fixed; width: auto;">
...
</table>
</div>
<div
style="overflow: hidden; padding-left: 0px; padding-right: 0px; position: absolute; margin-top: 0px; top: 0px; z-index: 1001; left: 0px; width: 558px;"
class="floatThead-container">
<table class="table floatThead-table"
style="margin: 0px; table-layout: fixed; width: 344.80286738351253%;">
<colgroup>
<col style="width: 158px;">
<col style="width: 165px;">
<col style="width: 183px;">
<col style="width: 58px;">
<col style="width: 62px;">
<col style="width: 44px;">
<col style="width: 74px;">
<col style="width: 77px;">
<col style="width: 89px;">
<col style="width: 106px;">
<col style="width: 145px;">
<col style="width: 145px;">
<col style="width: 41px;">
<col style="width: 138px;">
<col style="width: 152px;">
<col style="width: 33px;">
<col style="width: 56px;">
<col style="width: 53px;">
<col style="width: 145px;">
</colgroup>
<thead>
<tr>
<th>oneMinuteAverageLoad</th>
<th>fiveMinutesAverageLoad</th>
<th>fifteenMinutesAverageLoad</th>
<th>vendor</th>
<th>model</th>
<th>mhz</th>
<th>cacheSize</th>
<th>totalCores</th>
<th>totalSockets</th>
<th>coresPerSocket</th>
<th>user</th>
<th>system</th>
<th>nice</th>
<th>idle</th>
<th>wait</th>
<th>irq</th>
<th>softIrq</th>
<th>stolen</th>
<th>combined</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
weekens commented
Made a pull request.
mkoryak commented
fixed in master
lock commented
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.