-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I have a slide down effect on my menupoup, added with:
menupopup.setWidgetListener("onShow", "jq(this).hide().slideDown('fast');";
The menubar is autodrop="true", so passing the mouse over the menu will show the menupopup with the slide down effect. The problem is that moving the mouse over the menuitens (or the menupopup itself) will trigger the onShow again.
I'm not sure if this is a new bug from ZK 5.0.4, of a bug fixed from ZK 5.0.3.
Anyway, I would like to make the slidedown effect happen just once, when the menupopup show itself. Tried with onOpen event, but got the same behaviour.
Thanks for the help,
Madruga
Yep,
Mouse over on "Project" and the popup will slide down, mouse over on "Help" and the popup just appear (zk default) (side note for future thoughts, slide down could be default, feels much more natural, smoother than just appearing)
Now, mouse over an item inside "Project" and the menupoup will slide down again (I want to avoid this second slide down).
Here it is:
<zk xmlns:w="http://www.zkoss.org/2005/zk/client"> <menubar id="menubar" autodrop="true"> <menu label="Project" image="/img/Centigrade-Widget-Icons/Briefcase-16x16.png"> <menupopup w:onShow="jq(this).hide().slideDown('fast');"> <menuitem image="/img/Centigrade-Widget-Icons/BriefcaseSpark-16x16.png" label="New" onClick="alert(self.label)" /> <menuitem image="/img/Centigrade-Widget-Icons/BriefcaseOpen-16x16.png" label="Open" onClick="alert(self.label)" /> <menuitem image="/img/Centigrade-Widget-Icons/DisketteBlack-16x16.png" label="Save" onClick="alert(self.label)" /> <menuseparator /> <menuitem label="Exit" image="/img/Centigrade-Widget-Icons/DoorOpen-16x16.png" onClick="alert(self.label)" /> </menupopup> </menu> <menu label="Help" image="/img/Centigrade-Widget-Icons/QuestionmarkButton-16x16.png"> <menupopup> <menuitem label="Index" onClick="alert(self.label)" /> <menu label="About"> <menupopup> <menuitem label="About ZK" onClick="alert(self.label)" /> <menuitem label="About Potix" onClick="alert(self.label)" /> </menupopup> </menu> </menupopup> </menu> </menubar> </zk>
Hi
I tested on ZK 5.0.3 and ZK 5.0.4, it does seems a bug, please post a bug report hereand paste your sample code
<zk xmlns:w="http://www.zkoss.org/2005/zk/client"> <menubar autodrop="true"> <menu label="File"> <menupopup> <attribute w:name="onOpen"> //onOpen twice when set autodrop=true, and move mouse down zk.log("onOpen"); </attribute> <menuitem label="New" /> <menuseparator /> <menuitem label="Open" /> </menupopup> </menu> <menu label="File 2"> <menupopup > <menuitem label="New 2" /> <menuseparator /> <menuitem label="Open 2" /> </menupopup> </menu> </menubar> </zk>
Done.
Thanks for your attention.
Regards,
Madruga
Asked: 2010-09-01 19:55:57 +0800
Seen: 2,689 times
Last updated: Sep 02 '10