zurb / responsive-tables

Tables that work responsively on small devices.
429 stars 132 forks source link

Fix double-tables in FF near responsive boundary #13

Open nathanpbell opened 11 years ago

nathanpbell commented 11 years ago

FireFox calculates window width differently in media queries than it does in JavaScript. When responsive tables is viewed in FireFox at window widths near the responsive cut-off (ex: 768px), double tables can appear because the JavaScript has cloned the table in the HTML but the media query selectors haven't kicked in.

dijichi commented 11 years ago

chrome doesn't seem to like $.browser, and agents can be spoofed etc. it might be better to do something like this instead: var FF = !(window.mozInnerScreenX == null); if(FF) { scrollBarWidth = window.innerWidth - jQuery("body").width(); }