0

Scrollbar flicker?

asked 2009-03-25 22:20:26 +0800

versionfourx gravatar image versionfourx
99 2

Version: 3.6.0
Issue:
Scrollbar quickly flickers into view then exits when opening modal window

Steps:
1) Prereq: Within tablelayout
2) Create:
<button id="someButton" label="Advanced">
<attribute name="onClick">{
final Window win =
(Window) Executions.createComponents("/zul/someRandomWindow.zul",null,null);
}</attribute>
</button>

3) Create in someRandomWindow.zul:
<window id="something"
title="something"
position="center,top"
mode="modal"
border="normal"
width="525px"
action="onshow:anima.appear(#{self});onhide:anima.fade(#{self})">
<caption>
<toolbarbutton label="Close" onClick="something.detach()"/>
</caption>
...
</window>

4) Click: button from step 2 in Firefox
5) ** Notice: scrollbar flicker
6) Close: popup window
7) Click: button from step 2 again
8) ** Notice: NO scrollbar flicker unlike step 5

Comments: Is there a special "render" method I need to call first? Any ideas why the scrollbar would flicker the first time but not the following?

Thank you

delete flag offensive retag edit

9 Replies

Sort by ยป oldest newest

answered 2009-03-27 07:22:31 +0800

flyworld gravatar image flyworld
155 3

updated 2009-03-27 07:23:01 +0800

hi Richard,
i tried it on my firefox(both v2.0.0.20 and v3.0.7) and it works fine, without any scrollbar.

Here is my test code

<tablelayout columns="3">
	<tablechildren>
		<panel height="247px" title="table2" border="normal">
			<panelchildren>
				<button id="someButton" label="Advanced">
					<attribute name="onClick">{
final Window win = 
(Window) Executions.createComponents("test.zul",null,null);
}</attribute>
				</button>
			</panelchildren>
		</panel>
	</tablechildren>
	<tablechildren>
		<panel height="247px" title="table2" border="normal"
			collapsible="true">
			<panelchildren>
				<html>
					<h4>Direct RIA</h4> <ul>
					<li>Boosting Productivity</li>
					<li>Minimal Maintenance</li>
					<li>Engaging User Experience</li>
					<li>Fast Prototyping</li>
					<li>Real-time Push</li> </ul>
				</html>
			</panelchildren>
		</panel>
	</tablechildren>
	<tablechildren colspan="2">
		<panel title="table4" border="normal" collapsible="true">
			<panelchildren>
				ZK: No1. Ajax + Mobile
			</panelchildren>
		</panel>
	</tablechildren>
</tablelayout>

am i misunderstand ur problem ?

link publish delete flag offensive edit

answered 2009-03-27 18:57:51 +0800

versionfourx gravatar image versionfourx
99 2

Well, it seems dependent on how complex your test.zul file is. If you use a zul file that is very complex or has images, this seems to happen consistently.

link publish delete flag offensive edit

answered 2009-03-30 00:35:35 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

that's ok, :)
maybe you can provide a zul file ? or post it to our bug tracker
we will keep following it.

link publish delete flag offensive edit

answered 2009-03-31 21:09:15 +0800

versionfourx gravatar image versionfourx
99 2

<window id="zxcv" title="asdfasdfasdf" position="center,top" mode="overlapped" height="550px" border="normal" width="525px" action="onshow:anima.appear(#{self});onhide:anima.fade(#{self})">
	<caption>
		<toolbarbutton label="Close" onClick="zxcv.detach()"/>
  	</caption>
	<grid>
		<columns>
			<column width="20%"></column>
			<column width="100%"></column>
		</columns>
		<rows>
			<row>
				<label value="asdf: "/>
				<textbox width="100%"/>
			</row>
			<row>
				<label value="asdf: "/>
				<textbox width="100%" rows="5"/>
			</row>
			<row>
				<label value="asdf: "/>
				<combobox>
					<comboitem label="asdf"/>
					<comboitem label="asdf"/>
					<comboitem label="asdf"/>
					<comboitem label="asdf"/>
				</combobox>
			</row>
		</rows>
	</grid>
	<separator/>
	<columnlayout>
		<columnchildren width="50%">
			<panel title="asdfasdf">
				<panelchildren>
					<listbox id="left" multiple="true" checkmark="true" height="300px" fixedLayout="true">
						<listitem selected="true">
							<listcell src="/img/common/briefcase-16x16.png" label="asdf"/>
						</listitem>
						<listitem>
							<listcell src="/img/common/briefcase-16x16.png" label="asdf"/>
						</listitem>
						<listitem>
							<listcell src="/img/common/briefcase-16x16.png" label="asdf"/>
						</listitem>
						<listitem>
							<listcell src="/img/common/briefcase-16x16.png" label="asdf"/>
						</listitem>
						<listitem>
							<listcell src="/img/common/briefcase-16x16.png" label="asdf"/>
						</listitem>
					</listbox>
				</panelchildren>
			</panel>
		</columnchildren>
		<columnchildren width="100px">
			<panel>
				<panelchildren style="margin: 70px 34px;">
					<image sclass="pointer" src="/img/common/buttonArrowRightDouble.png" tooltiptext="Add asdf">
						<attribute name="onClick">
							Set items = left.getSelectedItems();
							if (items.isEmpty()) {
								alert("Please select at least one asdf to add!");
							} else {
								List al = new ArrayList(items);
								for (Iterator it = al.iterator(); it.hasNext();) {
									Listitem li = (Listitem)it.next();
									li.setSelected(false);
									right.appendChild(li);
								}
							}
						</attribute>
					</image>
					<separator height="15px"/>
					<image sclass="pointer" src="/img/common/buttonArrowLeftDouble.png"  tooltiptext="Remove asdf">
						<attribute name="onClick">
							Set items = right.getSelectedItems();
							if (items.isEmpty()) {
								alert("Please select at least one asdf to remove!");
							} else {
								List al = new ArrayList(items);
								for (Iterator it = al.iterator(); it.hasNext();) {
									Listitem li = (Listitem)it.next();
									li.setSelected(false);
									left.appendChild(li);
								}
							}
						</attribute>
					</image>
				</panelchildren>
			</panel>
		</columnchildren>
		<columnchildren width="50%">
			<panel title="asdfasdf">
				<panelchildren>
					<listbox id="right" multiple="true" checkmark="true" height="300px" fixedLayout="true">
						<listitem selected="true">
							<listcell src="/img/common/briefcase-16x16.png" label="asdfasdf"/>
						</listitem>
					</listbox>			
				</panelchildren>
			</panel>
		</columnchildren>
	</columnlayout>
	<separator/>
	<div align="center">
		<button id="asdf" label="Submit" onClick='alert("here")'/>
	</div>
</window>

link publish delete flag offensive edit

answered 2009-04-01 01:12:46 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

how can i duplicate the problem ? the zul you provide is "someRandomWindow.zul" ?

link publish delete flag offensive edit

answered 2009-04-01 22:09:17 +0800

versionfourx gravatar image versionfourx
99 2

Sorry, yes, that is the "someRandomWindow.zul"

link publish delete flag offensive edit

answered 2009-04-03 01:20:55 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

ok i found the problem, it happens only during the window is attach to tablelayout and move to overlapped,
browser is counting the size of new component, so the scrollbar flicker.

imo, the work around is that you can create a hidden div like

<div id="hidden" style="display:none;overflow:hidden;"/>

(better at the top of page)
then attach the window to the hidden div
final Window win = (Window) Executions.createComponents("someRandomWindow.zul",hidden,null);

then the scrollbar will not flicker

*the "overlapped" will move the window out of the div

link publish delete flag offensive edit

answered 2009-04-08 00:29:23 +0800

versionfourx gravatar image versionfourx
99 2

Thank you, your suggestion did fix the scrollbar flicker however the window failed to render properly.

Oddly, the dropdown became deformed (textarea smaller than dropdown image), the column layout did not render and nor did the bottom border.

Did it render completely on your end?

link publish delete flag offensive edit

answered 2009-04-14 09:45:41 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

yes... it render correctly :S

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-03-25 22:20:26 +0800

Seen: 487 times

Last updated: Apr 14 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More