Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-1758

Selectors finds too many components when using CSS child selector

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.0.0
    • Fix Version/s: 6.5.4
    • Component/s: General
    • Labels:
      None

      Description

      In following ZUL, the selector #lb > listitem should only match 2 components but 5.

      selector.zul

      <window id="win" width="600px" border="normal">
      
      	<listbox id="lb">
      		<listhead>
      			<listheader label="row0" />
      		</listhead>
      		<listitem>
      			<listcell label="item0" />
      		</listitem>
      		<listitem>
      			<listcell label="item1" />
      		</listitem>
      	</listbox>
      	<separator />
      	<listbox id="nohead">
      		<listitem>
      			<listcell label="i0" />
      		</listitem>
      		<listitem>
      			<listcell label="i1" />
      		</listitem>
      		<listitem>
      			<listcell label="i2" />
      		</listitem>
      	</listbox>
      	<separator />
      	<hbox>#lb listitem <label id="msg" /></hbox>
      	<hbox>#lb > listitem <label id="msg2" /></hbox>
      	<zscript><![CDATA[
             	     List comps = org.zkoss.zk.ui.select.Selectors.find(page, "#lb listitem");
            	     msg.setValue("" + comps.size());
            	     comps = org.zkoss.zk.ui.select.Selectors.find(page, "#lb > listitem");
            	     msg2.setValue("" + comps.size());
      	]]></zscript>
      
      </window>
      

        Issue Links

          Activity

          Hide
          jumperchen jumperchen added a comment -

          Bug fixed since 9/17/2013

          Show
          jumperchen jumperchen added a comment - Bug fixed since 9/17/2013

            People

            • Assignee:
              jumperchen jumperchen
              Reporter:
              paowang paowang
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: