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

vertical toolbar has sometimes <br> between items

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 8.5.0
    • Fix Version/s: 8.5.2
    • Component/s: None
    • Security Level: Jimmy
    • Labels:
      None
    • gh.sprint.customfield.default.name:
      ZK 8.5.2 S2

      Description

      Problem description

      vertical toolbar generates different markup:

      • initially, items are separated by <br> tags
      • if items are added dynamically, no <br> are used

      Shouldn't style be defined by CSS instead via <br>? Because of these "random" <br> tags, its hard to use proper CSS, e.g.

      .z-toolbar-vertical .z-separator:first-child {
        display:none;
      }
      

      steps to reproduce

      1. run the code below

      	<button label="add" onClick="add()"/>
      	<toolbar id="bar" orient="vertical">
      		<toolbarbutton label="b1"/>
      		<toolbarbutton label="b2"/>
      	</toolbar>
      	<zscript><![CDATA[
      public void add(){
      	Toolbarbutton b = new Toolbarbutton("new");
      	bar.appendChild(b);
      }
      	]]></zscript>
      

      2. click the button twice or more

      Current Result

      ZK doesn't render newly-added toolbar buttons vertically.

      Debug information

      Following js codesnippet does cause the issue:

      // ZK-1706: the width of empty space does not always equal 3px in ie9, ie10 
      var space = 'vertical' != this.getOrient() ? (zk.ie9 ? '<span></span>' : '') : '<br/>';
      

        Activity

        Hide
        Anonymous added a comment -

        Fixed since 2018/06/29

        Show
        Anonymous added a comment - Fixed since 2018/06/29

          People

          • Assignee:
            CharlesQiu CharlesQiu
            Reporter:
            fse fse
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 4 hours
              4h
              Remaining:
              Time Spent - 2 hours Remaining Estimate - 2 hours
              2h
              Logged:
              Time Spent - 2 hours Remaining Estimate - 2 hours
              2h

                Agile