Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
ScrollBar up/down buttons in table - have to click several times to scroll #9538
When showing a table with multiple rows such that it displays a vertical scroll bar, it takes several clicks on the up/down buttons to get the grid to scroll.
To reproduce, run the attached application.js, which is just an extract from the playground to generate a table and some rows. Clicking the down arrow in here takes 3 or 4 clicks to scroll one row. The desired behaviour is that it scrolls the default amount for one click.
This is happening on my Win10 box, with Chrome Version 66.0.3359.18
I think the problem stems from the fact that the button click has an animation duration. The animation sends a frame event which updates the position, which cancels the animation and the end point is never reached.
Call Stack for the animation being cancelled:
Verified using the demo browser with http://www.qooxdoo.org/devel/demobrowser/#table~Table.html and http://www.qooxdoo.org/current/demobrowser/#table~Table.html for
Clicking on the "scroll down button" does not move one line as expected. You have to click four or five times on the button to scroll one line down.
Note that this behaviour is only true when NOT using native scrollbars. If native scrollbars are used, a single click moves the table one or more rows down on the first click.
It seems that in the demo browser example the single click is processed, as the scroll drag button moves a fiew pixels on each click, until a "watermark" is reached and the table scrolls one row.
It may be that the algorithm has to be reviewed regarding on what is supposed to happen on a single click.
All this for non native scroll bars.