I'm building a responsive website using a mobile-first approach (meaning my default styles are for the mobile view, which are extended via css media queries to optimize the layout for desktop). I've tested my site on my phone (and by shrinking my desktop browser's width to less than 700px) and the mobile view kicks in beautifully.
I'm using the following line of HTML to ensure that on mobile devices, the width of the viewport is equal to the device width like so:<meta name="viewport" content="width=device-width, initial-scale=1" />
This website needs Infragistcs controls for some forms and so I added Ignite UI 2013.1 to the solution as I normally would. I know I've hooked the Ignite controls up properly because I've done it a million times and have implemented and tested the newly added Ignite Controls. They're fine.
This one of the strangest things I've ever come across; I loaded up the site on my phone again since implementing the Ignite controls and the site no longer displays the mobile-optimized view (as if the media queries are being ignored or if the viewport's width did NOT equal the device width).
Here are the steps I took to trouble shoot the issue:
Finally, I decided (while writing this post actually) to remove the initial-scale setting from my meta tag so it just read:<meta name="viewport" content="width=device-width"/>
The issue finally went away!!! So, I restored everything related to Infragistics and now I'm back up and running!
This post was originally supposed to be a "How do I...." post, but as I mentioned in the solution section, I figured out the problem while writing this. So, this post is now more of a reference for others. That said, I'll be adding this information along side my many other Infragistics-related posts on my company's dev blog (http://formativeinnovations.wordpress.com)
However, I still have a number of questions for Infragistics support staff:
Thank you,
Andrew
Hello Adrian,
I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Thank you for your patience while I was looking into this.
I’ve tested this with simple media queries that just change the background color based on the width of the browser.
They seem to take effect as expect when there’s igniteUI controls on the page when you start changing the browser’s width.
I’ve attached a sample for your reference. Please test it on your side and let me know whether the background changes when you change the browser’s width.
If it works as expected could you share the media queries you’ve set that don’t seem to take affect when you add igniteUI styles to the page so that I may look into them?
I'm looking forward to your reply.
Developer Support Engineer II
Thank you Maya,
Any help would be greatly appreciated as my deadline for this project is this week! If you need examples or more information from me, please do not hesitate to ask.
Thanks again,
Adrian
Hello abromfield ,
Thank you for posting in our forum.
I’m currently looking into your issue and I’ll let you know what I find out by tomorrow.
Ignore my Solution section, the problem is still there. I must have been checking against and old version or something when I thought I figured out.
Please help!