Software Archive
Read-only legacy content
17061 Discussions

Simulate doesn't apply size of device

Brian_S_1
Beginner
381 Views

I have some media queries in my CSS to enhance the UI for tablet devices. Example:

@media screen and (min-device-width: 768px) { ... }

 

In pre-3491 (with the Emulate tab) I was able to switch between devices (phones and tablets) and the Emulator would apply the appropriate CSS based on the device selected. Now, with the Simulate tab it always applies the "tablet" screen size, even if I have a small phone device selected. I get this behavior for versions 3491 and 3522.  The debug and builds work fine (so not a huge breaking issue), it's just I usually do the majority of the development on the Simulate tab since it is a bit quicker.

0 Kudos
2 Replies
PaulF_IntelCorp
Employee
381 Views

I'll log a bug regarding this issue. Thanks for the feedback. Try using a browser as an alternative, this will work as long as your app does not call any Cordova APIs. This might be useful if you use Chrome > https://developers.google.com/web/tools/chrome-devtools/iterate/device-mode <

0 Kudos
Brian_S_1
Beginner
381 Views

Thanks for the response Paul. After looking around a little more, this doc did spur me onto something:

https://software.intel.com/en-us/xdk/docs/intel-xdk-simulator-limitations

So, I changed min-device-width to min-width and it fixed the issue in the Simulate tab. It seems there are a few differences between the two, but I think I will be ok in my app.

0 Kudos
Reply