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

Resizable widget adds whitespace when user is scrolled all the way to the right #1544

Open
joshiegreer opened this issue Apr 26, 2018 · 3 comments

Comments

@joshiegreer
Copy link

This is a strange one, but when the resizable widget is turned on and the user updates a table with a horizontal scrollbar and the table has been scrolled all the way to the right, the left value for each handle position is set to the right of the table, creating white space. I verified that this occurs on the example page for the resizable widget, on the overflow table. If you scroll all the way to the right and then try to sort on a column, you'll see what I mean.

I tracked the problem down to line 2882 of widgets.js. For our purposes, if I set startPosition to 0 (startPosition is always 0 in our case), it fixes the problem. The original code is startPosition = c.$table.position().left; However, setting this to c.$table.position().left becomes a problem when the scrollbar isn't all the way to the left.

I am attempting to paste a couple of images taken from the overflow example at https://mottie.github.io/tablesorter/docs/example-widget-resizable.html. In the first, you can see the normal table size. In the second, you can see the white space that is created to the right of the table if the table reloads with the scrollbar positioned to the rightmost extent.

image

image

@Mottie
Copy link
Owner

Mottie commented Apr 26, 2018

Hi @joshiegreer!

Hmm, this appears to be an issue with jQuery v3.3.0+... if I set the startPosition to zero, it fixes everything. I guess I'll need to add a jQuery version check.

@Mottie
Copy link
Owner

Mottie commented Apr 26, 2018

Please check to make sure this issue has been resolved.

@joshiegreer
Copy link
Author

Hi Mottie,

Thanks for looking at this. We actually have an app running jQuery 1.12, and the problem persists with the new tablesorter code that you changed. In our app, as you mentioned above, changing startPosition to zero fixes everything, with no side effects that I can see at this point.

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

No branches or pull requests

2 participants