ColumnControl dropdown: scrollTop subtracted from left instead of top
ColumnControl dropdown: scrollTop subtracted from left instead of top
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
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