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

Selected item in Listbox did not scrolled into view automatically on Edge

XMLWordPrintable

      steps to reproduce

      1. run the code below
      2. hit button labeled as 'add under bottom' or 'add upon top'

      <zk>
          Please press on the two buttons twice, and then the scroll bar should be placed as the position as the selected item (blue background).
          <tree id="tree" width="400px" rows="3">
              <treecols sizable="true">
                  <treecol label="Name" />
                  <treecol label="Description" />
              </treecols>
              <treechildren id="t">
                  <treeitem>
                      <treerow>
                          <treecell label="Item 1" />
                          <treecell label="Item 1 description" />
                      </treerow>
                  </treeitem>
                  <treeitem>
                      <treerow>
                          <treecell label="Item 2" />
                          <treecell label="Item 2 description" />
                      </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>
                              <treerow>
                                  <treecell label="Item 2.2" />
                              </treerow>
                              <treechildren id="tc">
                                  <treeitem>
                                      <treerow>
                                          <treecell label="Item 2.2.1" />
                                      </treerow>
                                  </treeitem>
                              </treechildren>
                          </treeitem>
                      </treechildren>
                  </treeitem>
                  <treeitem label="Item 3" />
              </treechildren>
          </tree>
          <button label="add under bottom">
              <attribute name="onClick">
                  Treeitem ti = new Treeitem();
      Treerow tr = new Treerow();
      tr.appendChild(new Treecell("test"));
      ti.appendChild(tr);
      tc.appendChild(ti);
      ti.setSelected(true);
              </attribute>
          </button>
          <button label="add upon top">
              <attribute name="onClick">
                  Treeitem ti = new Treeitem();
      Treerow tr = new Treerow();
      tr.appendChild(new Treecell("test"));
      ti.appendChild(tr);
      t.insertBefore(ti, t.firstChild);
      ti.setSelected(true);
              </attribute>
          </button>
      </zk>
      

      current result

      the added data didn't be scrolled into view.

      expected result

      the added data should be scrolled into view.

            bobpeng bobpeng
            bobpeng bobpeng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h