≡

ColumnControl dropdown: scrollTop subtracted from left instead of top

ColumnControl dropdown: scrollTop subtracted from left instead of top

peter.brunspeter.bruns Posts: 7Questions: 5Answers: 0

Link to test case: https://github.com/DataTables/ColumnControl/blob/d099e138d6d771fc850d845fc4fb329aa3623c4c/js/content/dropdown.ts#L195

Hi,

I noticed a likely typo in relativePosition(). The vertical scroll offset is subtracted from left:

if (origin.scrollTop) {
    left -= origin.scrollTop;
}

I believe this should be top -= origin.scrollTop;, since vertical scrolling should adjust the dropdown’s vertical position.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 66,088Questions: 1Answers: 11,012 Site admin
    Answer ✓

    Completely agree - many thanks for letting me know about that. I've committed the fix now and it will be in the next patch release of ColumnControl.

    Allan

Sign In or Register to comment.