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

Popup shows at wrong position in the first time when it contains lots of data

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.5.6, 7.0.2
    • 6.5.5, 7.0.1
    • Components
    • Security Level: Jimmy
    • None
    • chrome 34, IE 10

      Problem Description:

      If A popup has a listbox which contains items more than visible rows, when the popup is open in the first time, it doesn't show at specified position. It shows on top of the windows:

      But when you open the popup the second time, it shows at correct position:

      Reproducing Step:

      1. run the zul below
      2. click the button "First click can see the bug"
      <zk>
      		<window id="dialog" mode="modal" border="normal" width="600px"
      			height="400px" >
      			<space height="200px" />
      			<button sclass="inactiveButton" label="No issue"
      				onClick='serviceInvoicePop.open(self,"after_start")'/>
      			<button label="First click can see the bug" 
      				onClick='serviceWorkspace.open(self,"after_start")'	/>
      			<popup id="serviceInvoicePop" style="border: 1px solid #86A4BE;" width="300px">
      				<listbox id="invoiceBox" rows="10">
      					<listhead>
      						<listheader>
      							<vlayout>
      								<space height="3px" />
      								<textbox instant="true"
      									width="80%" />
      								<label value="labels.service.addmodify.label.inter" />
      							</vlayout>
      						</listheader>
      					</listhead>
      					<template name="model" var="each">
      						<listitem>
      							<listcell label="${each}" value="${each}" />
      						</listitem>
      					</template>
      				</listbox>
      			</popup>
      
      			<popup id="serviceWorkspace" style="border: 1px solid #86A4BE;" width="300px">
      				<listbox id="workspaceBox" rows="10">
      					<listhead>
      						<listheader>
      							<vlayout>
      								<space height="3px" />
      								<textbox instant="true"
      									width="80%" />
      								<label value="Service label" />
      							</vlayout>
      						</listheader>
      					</listhead>
      					<template name="model" var="each">
      						<listitem>
      							<listcell label="${each}" value="${each}" />
      						</listitem>
      					</template>
      				</listbox>
      			</popup>
      			<zscript><![CDATA[
      				ListModelList model60 = new ListModelList();			                  
      				for (int i = 0; i<60 ;i ++){
      					model60.add("Space "+i);
      				}
      				workspaceBox.setModel(model60);
      				
      				ListModelList model3 = new ListModelList();
      				model3.add("Invoice a");
      				model3.add("Invoice b");
      				model3.add("Invoice c");
      				invoiceBox.setModel(model3);
      			]]></zscript>
      
      		</window>
      </zk>
      

      Actual:

      The popup shows on top of the screen.

      Expected:

      The popup should show on the bottom of the specified button.

      Workaround:

      set popup's height to a fixed value or set popup's style with style="max-height:500px"

            jumperchen jumperchen
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: