Page Down does not work with selectable VScrollTable when there's a horizontal scrollbar
Open
Nobody has claimed this yet.
bug
Stale
v7
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 717
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 3
Description
Originally by T-Gergely
This code fails when there's a horizontal scrollbar:
VScrollTableRow lastVisibleRowInViewPort = scrollBody
.getRowByRowIndex(firstRowInViewPort
+ getFullyVisibleRowCount() - 1);
if (lastVisibleRowInViewPort != null
&& lastVisibleRowInViewPort != focusedRow) {
Client height should be divided instead of offset height:
private int getFullyVisibleRowCount() {
return (int) (scrollBodyPanel.getOffsetHeight() / scrollBody
.getRowHeight());
}
I don't know GWT, but the below seems to work:
private int getFullyVisibleRowCount() {
return (int) (DOM.getElementPropertyInt(scrollBodyPanel.getElement(),
"clientHeight") / scrollBody.getRowHeight());
}
Imported from https://dev.vaadin.com/ issue #13338
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating getFullyVisibleRowCount and the selectable VScrollTable Page Down handling described in the issue. Reproduce the case with a horizontal scrollbar, inspect the existing row-count calculation, and verify that Page Down selects the expected visible row without the scrollbar affecting the calculation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100