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

Fix double-tables in FF near responsive boundary #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nathanpbell
Copy link

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.

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
Copy link

dijichi commented Jun 13, 2013

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

NicholasRBowers added a commit to NicholasRBowers/responsive-tables that referenced this pull request Apr 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants