Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repetitive floatThead initialization-destruction produces a DOM leakage #75

Closed
weekens opened this issue Apr 7, 2014 · 3 comments
Closed

Comments

@weekens
Copy link
Contributor

weekens commented Apr 7, 2014

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 weekens changed the title Repetitive floatThead initialization-destruction imposes a DOM leakage Repetitive floatThead initialization-destruction produces a DOM leakage Apr 7, 2014
@weekens
Copy link
Contributor Author

weekens commented Apr 7, 2014

Made a pull request.

mkoryak added a commit that referenced this issue Apr 7, 2014
Fixed DOM leakage in destroy (#75).
@mkoryak
Copy link
Owner

mkoryak commented Apr 8, 2014

fixed in master

@mkoryak mkoryak closed this as completed Apr 8, 2014
@lock
Copy link

lock bot commented Dec 11, 2019

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.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants