Duplicate rows inserted during 'window resize' #98

Closed
yarf opened this Issue Feb 20, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@yarf

yarf commented Feb 20, 2017

Bumped into the following scenario:

I have several "tab" divs in a webpage, where each tab is hidden/shown using "display: block" and "display: none". One of these tabs contains a pair of Clusterize'd tables.

When showing the tab with the table, everything operates as expected. There is one row in each. When switching to another tab (so that now Clusterize is in a 'display:none' div") and then resizing the window, a couple duplicate rows are inserted into the Clusterize'd content area. This happens to just one of the tables rather than both, yet both are identical in terms of CSS and styling ('table-layout:fixed').

Inspecting the relevant content-area/rows (in the Browser) shows this happening as soon a resize happens on the "hidden" Clusterize'd table. There are no explicit calls to update() or similar when this occurs, so I'm assuming it's related to the onresize() handler in the plugin?

Interestingly, a subsequent update() with the original single-row does not clear those additional rows either. It's like they're stuck there once created.

It does appear to be related to Clusterize being rendered inside a hidden div ...

Cheers!

@NeXTs

This comment has been minimized.

Show comment
Hide comment
@NeXTs

NeXTs Feb 20, 2017

Owner

Codepen example would help a lot

Owner

NeXTs commented Feb 20, 2017

Codepen example would help a lot

@yarf

This comment has been minimized.

Show comment
Hide comment
@yarf

yarf Feb 20, 2017

http://codepen.io/anon/pen/vgoBQw

Click button at top to switch tabs; then resize window; click again to switch back and see duplicates.

Noticed this does not occur with v0.16.0, FWIW ... nor with 0.17.0

yarf commented Feb 20, 2017

http://codepen.io/anon/pen/vgoBQw

Click button at top to switch tabs; then resize window; click again to switch back and see duplicates.

Noticed this does not occur with v0.16.0, FWIW ... nor with 0.17.0

@NeXTs NeXTs closed this in 973efb7 Feb 25, 2017

@yarf

This comment has been minimized.

Show comment
Hide comment
@yarf

yarf Feb 25, 2017

Thanks, though I'm afraid the commit doesn't quite address the issue effectively -- the very next call to update(), either before or after switching back from another tab, causes the same issue to occur.

http://codepen.io/anon/pen/PpwBGV

... added an update() timer at the bottom to emulate the behavior

yarf commented Feb 25, 2017

Thanks, though I'm afraid the commit doesn't quite address the issue effectively -- the very next call to update(), either before or after switching back from another tab, causes the same issue to occur.

http://codepen.io/anon/pen/PpwBGV

... added an update() timer at the bottom to emulate the behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment