Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Problem when no scroll because there are few elements and aboveSize #93

@ccanado

Description

@ccanado

Under circumstances mentioned in the title, when _resetIndex is executed, a call to setScrollTop is made

(1268)
this._scrollTop = this.setScrollTop(this._aboveSize + (index / this._rowFactor) * this._physicalAverage);

At this moment this._scrollTop has to be set with a at least aboveSize.

(520)

this.setScrollTop = function(val) {
    target.scrollTop = val;
    return target.scrollTop;
};

but after target.scrollTop = 48; (for example)
target.scrollTop still value 0 since there is no scroll (no scroll because there are few elements).
So when the function return target.scrollTop, returns 0 instead of returning 48.

It would be needed to check first if target.scrollTop can be set or not

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions