You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When setting the width of the double scroll elements, you're setting the elements based on the $contentElement's outer width (line 92) but then resetting the $topScrollBar width to $self.width() (line 93).
The problem is that $self.width() subtracts borders on the table / table cells from the overall width.
Eg:
I have a table that is 750px wide with no border around it. The table's cells (th/td) have a 2px border on all sides.
$contentElement.outerWidth() = 750px; (this is the desired width)
$self.width() = 746px; // 740px - 4px (cell border left and right)
The reset on line 93 is causing the top scrollbar to show unexpectedly because it's width is being set incorrectly. Outer width is a better solution as it behaves like css' box-sizing: border-box.
What is the purpose of the reset on line 93? Can that be removed given you're setting $topScrollBar's width on the line above (line 92)?
Thanks,
Tom
The text was updated successfully, but these errors were encountered:
@tgdev Not sure how much the source has been changed since this was posted, but line 93 currently seems to bind the scrollbars to the content area. Or at least if I remove it, they work isolated, the scroll bar will move but not scroll the content area and vice versa.
When setting the width of the double scroll elements, you're setting the elements based on the $contentElement's outer width (line 92) but then resetting the $topScrollBar width to $self.width() (line 93).
The problem is that $self.width() subtracts borders on the table / table cells from the overall width.
Eg:
I have a table that is 750px wide with no border around it. The table's cells (th/td) have a 2px border on all sides.
$contentElement.outerWidth() = 750px; (this is the desired width)
$self.width() = 746px; // 740px - 4px (cell border left and right)
The reset on line 93 is causing the top scrollbar to show unexpectedly because it's width is being set incorrectly. Outer width is a better solution as it behaves like css' box-sizing: border-box.
What is the purpose of the reset on line 93? Can that be removed given you're setting $topScrollBar's width on the line above (line 92)?
Thanks,
Tom
The text was updated successfully, but these errors were encountered: