0

Trouble with Popup

asked 2009-07-23 19:51:12 +0800

dastultz gravatar image dastultz
797 9

Hello,
I seem to be having a little trouble with the Popup. Click the button, pop up shows, click off the pop up it closes. Click the button again, pop up flashes briefly and goes away. It's difficult to get it to show again.

<window>
	<button id="btn" label="Pick" onClick="pop.open(btn)" />
	<popup id="pop">
		<calendar />
	</popup>
</window>

ZK 3.6.1-FL-2009-03-23
FF 3.0.12
Safari 4.0.2
Mac 10.4

It seems to be ok in the live demo (3.6.2). Maybe someone can confirm it works ok in anything later than 3.6.1-FL?

Thanks.

/Daryl

This behavior is present on 3.5.1FL

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2009-07-23 19:52:43 +0800

dastultz gravatar image dastultz
797 9

Oh, also, Popup.open(component) is supposed to open the Popup "under" the referenced component, but it seems to open where the mouse is.

/Daryl

link publish delete flag offensive edit

answered 2009-07-27 09:35:39 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

Hi Daryl,

Are they fixed in ZK 3.6.2?

/robbie

link publish delete flag offensive edit

answered 2009-07-27 12:44:09 +0800

dastultz gravatar image dastultz
797 9

The behavior appears to be the same for me in 3.6.2 although it works better in Zk Explorer demo. The problem with the popup appearing "under" the specified component occurs in 3.5.1FL, and 3.6.2 including Zk Explorer.

Can somebody run my example in 3.6.2 and confirm? Maybe there is some issue with my install?

Thanks.

/Daryl

link publish delete flag offensive edit

answered 2009-07-28 11:14:03 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

Hi Daryl,

the popup will be open where the mouse-down occurs.

/robbie

link publish delete flag offensive edit

answered 2009-07-28 12:02:50 +0800

dastultz gravatar image dastultz
797 9

Ok, well maybe you should update the JavaDocs then:

/**
	 * Opens this popup right below the specified component at the cleint.
	 * <p>In most cases, the popup is shown automatically when specified
	 * in the tooltip, popup and context properties
	 * ({@link XulElement#setTooltip}, {@link XulElement#setPopup},
	 * and {@link XulElement#setContext}).
	 * However, if you want to show it manually, you can invoke this
	 * method directly.
	 *
	 * @param ref the reference component to position the popup.
	 * It cannot be null.
	 * @since 3.0.0
	 */
	public void open(Component ref) {
		response("popup", new AuPopup(this, ref));
	}

/Daryl

link publish delete flag offensive edit

answered 2009-07-31 01:17:42 +0800

robbiecheng gravatar image robbiecheng
1144 2
http://robbiecheng.sys-co...

Hi Daryl,

The javadoc has been fixed since 3.6.1.
You can try this api Popup.open(Component ref, java.lang.String position) to show in your preferred position.

/robbie

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-07-23 19:51:12 +0800

Seen: 283 times

Last updated: Jul 31 '09

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