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

Wrong rendering of collapsed navbar with pre-selected menuitem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.6.1
    • 8.0.4.1
    • ZK Client Engine
    • Security Level: Jimmy
    • IE11

    • ZK 8.6.1 S1

      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>
      

            rudyhuang rudyhuang
            CJahn CJahn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h