-
Notifications
You must be signed in to change notification settings - Fork 19
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
Mysterious failure when a page contains too many children #29
Comments
Ran another experiment: |
It sounds like this is a case where iron-pages fixates on its children before page load is finished and doesn't notice as more are added. Changes have landed to this behavior somewhat recently, I'll message you privately with info on how to test your internal code with the latest code from github. |
You're correct about the fixating. When I call up the .items attribute of the iron-pages element it only lists the first element. I can manually add the second div to the .items array and then .selectNext() works properly. |
What happens if you call I wonder if we need to listen for DOMContentLoaded in iron-selector... |
\cc @cdata who's done a lot of the work on iron-selector |
This happens at iron-pages 1.0.8 - even with a page with 64 (recursively counted) children |
While attempting to create a tabbed interface for a tool, I found that having too many children inside of one of the "page" divs of an iron-pages element breaks the functionality. Here's the relevant chunk of the page:
JS executed via console:
This properly switches between the two divs (the one with the many rows and the one with "Blah") when x (the number of repeated rows) is 250 but does not (and provides no js error in the console) when x is 12000. When broken, the selectNext() method call doesn't append the 'iron-selected' class to the second div and leaves the first div with a strange artifact class (i.e.
<div id='problem-content' class>
). Manually applying the class='iron-selected' attribute to the second div still makes it appear properly.Additional Info 1: I tried altering the html such that the table and its rows were replaced by divs but that didn't alter the behavior:
Additional Info 2: I tried breaking the functional page with the 250 divs by adding a bunch of new divs via the console:
This caused the 13000 new divs to be added correctly but the resulting page still worked.
Thus: This problem seems to only be exhibited when the content is all there while the page loads.
The text was updated successfully, but these errors were encountered: