0

Wide listbox scrolls right when selecting a single item

asked 2014-02-26 06:51:31 +0800

Manz gravatar image Manz
27

updated 2014-02-26 07:04:29 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

Hi ZK-Team,

I created a hugh listbox with wide column sizes. The horizontal scrollbar appears as expected but the focus jumps to the last columns. This happens when the "selected"-property of a single item is set to "true". So every time the listbox refreshes, the user must move the scrollbar back to the left.

I could reproduce this behaviour in the Sandbox with following minimized source:

<listbox>
  <listhead sizable="true">
    <listheader label="a" width="50px"/>
    <listheader label="b" width="25px"/>
    <listheader label="c" width="75px"/>
    <listheader label="d" width="500px"/>
    <listheader label="e" width="250px"/>
    <listheader label="f" width="500px"/>
    <listheader label="g" width="125px"/>
    <listheader label="h" width="25px"/>
    <listheader label="i" width="75px"/>
    <listheader label="j" width="500px"/>
  </listhead>
  <listitem>
    <listcell label="a1"/>
    <listcell label="b1"/>
    <listcell label="c1"/>
    <listcell label="d1"/>
    <listcell label="e1"/>
    <listcell label="f1"/>
    <listcell label="g1"/>
    <listcell label="h1"/>
    <listcell label="i1"/>
    <listcell label="j1"/>
  </listitem>
  <listitem selected="true">
    <listcell label="a2"/>
    <listcell label="b2"/>
    <listcell label="c2"/>
    <listcell label="d2"/>
    <listcell label="e2"/>
    <listcell label="f2"/>
    <listcell label="g2"/>
    <listcell label="h2"/>
    <listcell label="i2"/>
    <listcell label="j2"/>
  </listitem>
</listbox>

When removing the "selected" property, everything works find but its not possible to select a single special item in the view without this behaviour.

How could I work around this issue? Thanks for an answer!

Best regards Marco Manz

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-02-26 07:08:40 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

updated 2014-02-26 08:29:21 +0800

Created fiddle with your code.

As you can see under 6.5.3 it workd correctly but under 7.0.0 not.

Edit : tracker created.

Greetz chill.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-02-26 06:51:31 +0800

Seen: 16 times

Last updated: Feb 26 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More