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

Table not resizing with browser's resize button #57

Closed
fredbutters opened this issue Feb 23, 2014 · 11 comments
Closed

Table not resizing with browser's resize button #57

fredbutters opened this issue Feb 23, 2014 · 11 comments

Comments

@fredbutters
Copy link

I've seen this in IE9, FF and Chrome:
I have a dynamic width table (table and wrapper width: 100%). If I maximize the browser on the screen by clicking the browser's resize button, then click the button again to shrink the browser to it's original size the whole table is no longer visible; it partially hides the last column.

If you click and drag the browser very slightly, the table will adjust to the proper size.

I tried playing with the debounceResizeMs value, but that didn't help. I also tried stripping out as much CSS as possible and shrinking the table's width to 90%.

http://jsfiddle.net/barryman9000/DxX2T/7/

@mkoryak
Copy link
Owner

mkoryak commented Feb 23, 2014

Ill take a look when I have time. I assume this is on windows right?

@fredbutters
Copy link
Author

Thanks! And yes, I'm using Windows 7.

@mkoryak
Copy link
Owner

mkoryak commented Feb 27, 2014

Just looked in firefox on my windows VM, could not reproduce on that fiddle. Are you seeing it there 100% of the time?

@fredbutters
Copy link
Author

One person on a Stackoverflow post said they don't see it when using OSX. I'm seeing it 100% of the time on Windows 7 machines using IE10, FF and Chrome. Were you using Windows 7? Here's a video where I show the behavior in Chrome:
http://www.youtube.com/watch?v=BWoHkwcHc64

Thanks again, I really appreciate you looking into this. Other than this very minor issue this plugin is awesome!

@mkoryak
Copy link
Owner

mkoryak commented Feb 28, 2014

Thanks for the video, I'll get my hands on a windows box and fix this in the next few days.

@mkoryak
Copy link
Owner

mkoryak commented Feb 28, 2014

sadly, it turns out that I dont have access to a windows box. I cannot reproduce it on my windows VM.

You should try the following workaround for now:

$(window).on('resize', function(){
   setTimeout(function(){
     $table.floatThead('reflow'); //may not need this settimeout
   }, 1);
});

@fredbutters
Copy link
Author

It's close! It's still partially hiding that last column - especially on larger tables - but you can see more of the last column with this reflow. I tried with/without the setTimeout and I tried increasing the milliseconds. I made another video with a slightly larger table (more cells).

http://www.youtube.com/watch?v=uuEGvBv2gnU

Thanks again.

@mkoryak
Copy link
Owner

mkoryak commented Mar 1, 2014

call it 5 times at different intervals after the resize? Yes that is super hacky but I'd like for you to have a workaround until I can find myself a windows box and some time to fix this issue.

@fredbutters
Copy link
Author

That definitely helps for the time being. Thanks for the temporary solution.

mkoryak added a commit that referenced this issue Apr 11, 2014
mkoryak added a commit that referenced this issue Apr 11, 2014
@mkoryak
Copy link
Owner

mkoryak commented Apr 11, 2014

finally got my act together and downloaded an XP VM. Thanks for reporting this, I think i've been seeing other symptoms of this bug for a while now. The fix is on master now and will be in 1.2.6 release

@mkoryak mkoryak closed this as completed Apr 11, 2014
mkoryak added a commit that referenced this issue Apr 12, 2014
* origin/gh-pages:
  #59 - support tables with existing colgroups
  testcase and fix for #57
  hey, i don't need to do this anymore!
  stop using rawgithub
  update docs about download location

Conflicts:
	tests/issue-70.html
@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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants