responsive-tables icon indicating copy to clipboard operation
responsive-tables copied to clipboard

Fix double-tables in FF near responsive boundary

Open nathanpbell opened this issue 12 years ago • 1 comments

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.

nathanpbell avatar Jan 14 '13 12:01 nathanpbell

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

dijichi avatar Jun 13 '13 07:06 dijichi