-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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
Hi Daryl,
Are they fixed in ZK 3.6.2?
/robbie
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
Hi Daryl,
the popup will be open where the mouse-down occurs.
/robbie
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
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
Asked: 2009-07-23 19:51:12 +0800
Seen: 283 times
Last updated: Jul 31 '09