-
Bug
-
Resolution: Invalid
-
Normal
-
None
-
8.0.0
-
None
As title, the size of children differs in different situation.
Sample 1: the size is 12
<zk xmlns:x="xhtml" xmlns:n="native"> <x:ul id="container"> <forEach begin="1" end="10"> <n:li> list-item </n:li> </forEach> </x:ul> <script><![CDATA[ zk.afterMount(function() { var wgt = zk.Widget.$('$container'); zk.log(wgt.nChildren); }); ]]></script> </zk>
Sample 2: the size is 10
<zk xmlns:x="xhtml" xmlns:n="native"> <x:ul id="container"><forEach begin="1" end="10"><n:li>list-item</n:li></forEach> </x:ul> <script><![CDATA[ zk.afterMount(function() { var wgt = zk.Widget.$('$container'); zk.log(wgt.nChildren); }); ]]></script> </zk>
Sample 3: the size is 13
<zk xmlns:x="xhtml" xmlns:n="native"> <x:ul id="container"> <x:li>list-item</x:li> <x:li>list-item</x:li> <x:li>list-item</x:li> <x:li>list-item</x:li> <x:li>list-item</x:li> <x:li>list-item</x:li> </x:ul> <script><![CDATA[ zk.afterMount(function() { var wgt = zk.Widget.$('$container'); zk.log(wgt.nChildren); }); ]]></script> </zk>
Sample 4: the size is 7
<zk xmlns:x="xhtml" xmlns:n="native"> <x:ul id="container"> <n:li>list-item</n:li> <n:li>list-item</n:li> <n:li>list-item</n:li> <n:li>list-item</n:li> <n:li>list-item</n:li> <n:li>list-item</n:li> </x:ul> <script><![CDATA[ zk.afterMount(function() { var wgt = zk.Widget.$('$container'); zk.log(wgt.nChildren); }); ]]></script> </zk>