Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect topScrollBar width being set #3

Open
tgdev opened this issue Jan 6, 2016 · 1 comment
Open

incorrect topScrollBar width being set #3

tgdev opened this issue Jan 6, 2016 · 1 comment

Comments

@tgdev
Copy link
Contributor

tgdev commented Jan 6, 2016

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

@harveydobson
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants