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

Scrollable menubar body is not properly resized after container resizing.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.2
    • 8.0.1
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.0.2 S1
    • None

      Using both scrollable and hflex="1" on a menubar.
      The menubar z-menubar-body div width is updated by the _checkScrolling method when the menubar is resized.
      If the menubar is too short to display every children, it will switch to scrollable display and update the body div width accordingly.
      When the menubar then grow large enough to display every children, it will switch back to regular display. however, the body div width is no longer updated and will keep the last calculated width.
      This causes the content to appear truncated.

      Steps to reproduce:
      With the following code. Resize the window to trigger scrollable display. Slowly expand the window untill the display switch back to regular.
      As a result, the rightmost element will appear to be truncated.

      <zk>
      	<div hflex="1">
      		<menubar scrollable="true" hflex="1">
      			<menuitem label="test long long test" />
      			<menuitem label="test long long test" />
      			<menuitem label="test long long test" />
      			<menuitem label="test long long test" />
      			<menuitem label="test long long test" />
      			<menuitem label="test long long test" />
      			<menuitem label="test long long test" />
      		</menubar>
      	</div>
      </zk>
      

      Attached a JS workaround to remove width from the menubar bodydiv when the menubar revert to regular display for reference.

            DevChu DevChu
            MDuchemin MDuchemin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h