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

Header not aligned due to scroll bars #84

Closed
Messenger opened this issue May 7, 2014 · 4 comments
Closed

Header not aligned due to scroll bars #84

Messenger opened this issue May 7, 2014 · 4 comments
Labels

Comments

@Messenger
Copy link

I have an issue where the table headers do not take into account the scroll bar size when they reflow. Here is an example that repros the issue in IE10 and chrome:

http://jsfiddle.net/DxX2T/23/

if you scroll all the way to the right you will notice the table is not aligned with the header. I have resolved this by moving the calculateScrollBarSize() to after ensureReflow() and changing calculateScrollBarSize() to do the following:

  function calculateScrollBarSize(){ //this should happen after the floating table has been positioned
    if($scrollContainer.length){
        scrollbarOffset.horizontal = $scrollContainer.width() < $table.width() ? scWidth : 0;
        scrollbarOffset.vertical = $scrollContainer.height() < $table.height() ? scWidth : 0;
        scrollbarOffset.horizontal = $scrollContainer.width() - scrollbarOffset.vertical < $table.width() ? scWidth : 0;
        scrollbarOffset.vertical = $scrollContainer.height() - scrollbarOffset.horizontal < $table.height() ? scWidth : 0;
    }
  }
@mkoryak mkoryak added the bug label May 7, 2014
@mkoryak
Copy link
Owner

mkoryak commented May 7, 2014

Thanks, this looks like a windows only bug, ill see what I can do

@mkoryak
Copy link
Owner

mkoryak commented May 8, 2014

for now a workaround would be to make the container height 16 pixels bigger :)

mkoryak added a commit that referenced this issue May 12, 2014
mkoryak added a commit that referenced this issue May 12, 2014
mkoryak added a commit that referenced this issue May 12, 2014
@mkoryak
Copy link
Owner

mkoryak commented May 12, 2014

fixed on master

@mkoryak mkoryak closed this as completed May 12, 2014
@lock
Copy link

lock bot commented Dec 11, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants