turbolinks / turbolinks-classic

Classic version of Turbolinks. Now deprecated in favor of Turbolinks 5.
MIT License
3.54k stars 428 forks source link

Media Queries in <body> do not load properly in IE #568

Open gabeodess opened 9 years ago

gabeodess commented 9 years ago

When I include a stylesheet in the tag of my document and link to it via Turbolinks, the media queries get rendered without restriction in IE. I've found that resizing the browser triggers the media queries to render properly. Perhaps, issuing a page resize on page load for IE would fix this problem?

Thibaut commented 9 years ago

Please post code or a URL where we can reproduce.

syropian commented 9 years ago

We've also been encountering this in ie11. A full page refresh works fine, but if the page is shown with turbolinks, the media queries activate, even if they don't match the current screen size. I tried triggering resize with $(window).trigger('resize') but that didn't fix anything. I have to physically change the browser dimensions to get it to update.

Edit: To reproduce, just have a style tag within your page's body that has media query rules, and then load the page through turbolinks.

Fudoshiki commented 6 years ago

Only actual for pages where present button tag or input type='submit'