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

Wrong rendering of collapsed navbar with pre-selected menuitem

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: 8.0.4.1
    • Fix Version/s: None
    • Component/s: ZK Client Engine
    • Labels:
    • Environment:

      IE11

      Description

      Steps to Reproduce

      Run Fiddle: http://zkfiddle.org/sample/3in3jc4/1-collapsed-navbar-with-selected-sub-menuitem-bug
      Hover your cursor over the "BA" or "BB" entries and see the menu entries jumping to their correct positions.

      Actual Result

      Initial rendering of a navbar menu structure is incorrect having a pre-selected sub menuitem.
      It does not match the "collapsed style"

      Expected Result

      no initial animation, hidden <navitem>s

      Debug Info

      in collapsed mode the <navitem>s are only visible when hovering the parent <nav> element
      <child>navitems don't affect the height/width of the surrounding <navbar>

      Workaround

      <script><![CDATA[
      /*workaround for ZK-3609*/
      zk.afterLoad('zkmax.nav', function() {
      	var xNav = {};
      	zk.override(zkmax.nav.Nav.prototype, xNav, {
      		open : function() {
      			//don't open the top most <nav> widgets when collapsed
      			if(!this.getNavbar().isCollapsed() || !this.isTopmost()) {
      				xNav.open.apply(this, arguments);
      			}
      		}
      	});//zk.override
      });//zk.afterLoad
      ]]></script>
      

        Activity

        Hide
        cor3000 cor3000 added a comment -

        simplified static example (http://zkfiddle.org/sample/3in3jc4/3-collapsed-navbar-with-selected-sub-menuitem-bug):

        <navbar orient="vertical" collapsed="true">
        	<nav label="A" iconSclass="z-icon-plus">
        	   <navitem label="AA" iconSclass="z-icon-plus" selected="false"/>
        	</nav>
        	<nav label="B" iconSclass="z-icon-minus">
        	   <navitem label="BA" selected="false"/>
        	   <navitem label="BB" selected="true"/>
        	</nav>
        	<navitem label="C" iconSclass="z-icon-money" selected="false"/>
        </navbar>
        
        Show
        cor3000 cor3000 added a comment - simplified static example ( http://zkfiddle.org/sample/3in3jc4/3-collapsed-navbar-with-selected-sub-menuitem-bug): <navbar orient= "vertical" collapsed= "true" > <nav label= "A" iconSclass= "z-icon-plus" > <navitem label= "AA" iconSclass= "z-icon-plus" selected= "false" /> </nav> <nav label= "B" iconSclass= "z-icon-minus" > <navitem label= "BA" selected= "false" /> <navitem label= "BB" selected= "true" /> </nav> <navitem label= "C" iconSclass= "z-icon-money" selected= "false" /> </navbar>

          People

          • Assignee:
            Unassigned
            Reporter:
            CJahn CJahn
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: