mkoryak / floatThead

Fixed <thead>. Doesn't need any custom css/html. Does what position:sticky can't

Home Page:https://mkoryak.github.io/floatThead/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Table not resizing with browser's resize button

fredbutters opened this issue · comments

commented

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/

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

commented

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

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

commented

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!

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

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);
});
commented

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.

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.

commented

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

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

commented

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.