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

Strange behavior when using Clients.scrollIntoView(treeitem) on a tree with long labels

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.0.2
    • 7.0.0, 6.5.5, 7.0.1, 6.5.6
    • General
    • Security Level: Jimmy

      Click on the button repeatedly and the tree would scroll horizontally back and forth.

      test.zul
      <zk>
          <div width="300px" vflex="min">
              <tree id="tree" hflex="1" vflex="min">
                  <treecols sizable="true">
                      <treecol hflex="min" label="Name" />
                  </treecols>
                  <treechildren>
                      <treeitem>
                          <treerow>
                              <treecell
                                  label="Item with very long labels - 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789 0123456789" />
                          </treerow>
                          <treechildren>
                              <treeitem>
                                  <treerow>
                                      <treecell label="Item 2.1" />
                                  </treerow>
                                  <treechildren>
                                      <treeitem>
                                          <treerow>
                                              <treecell label="Item 2.1.1" />
                                          </treerow>
                                      </treeitem>
                                      <treeitem>
                                          <treerow>
                                              <treecell label="Item 2.1.2" />
                                          </treerow>
                                      </treeitem>
                                  </treechildren>
                              </treeitem>
                              <treeitem id="apa">
                                  <treerow>
                                      <treecell label="Item 2.2" />
                                  </treerow>
                                  <treechildren>
                                      <treeitem>
                                          <treerow>
                                              <treecell label="Item 2.2.1" />
                                          </treerow>
                                      </treeitem>
                                  </treechildren>
                              </treeitem>
                          </treechildren>
                      </treeitem>
                      <treeitem label="Item 3" />
                  </treechildren>
              </tree>
          </div>
          <button
              onClick="Clients.scrollIntoView(apa)"
              label="Push me" />
      </zk>
      

            jumperchen jumperchen
            neillee neillee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: