Simulate doesn't apply size of device

Simulate doesn't apply size of device

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.

3 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

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 <

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.

发表评论

登录添加评论。还不是成员?立即加入