- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had updated to Intel XDK V3491 and found that the JavaScript window.screen object properties width, height, availWidth, and availHeight stopped returning valid values. No matter the type of cell phone that I choose in the simulator, the width is set to 1366 and height is set to 728. I created a new project to test with and find that no matter what I set access to for the build it will not allow canvas to display on the new project but previous existing project will allow canvas to display. I had opened the new index.html in firefox and found that it would display. I am left contemplating what has changed with the security, access, privileges, associated with both the old and new projects. Could the change in the window.screen object properties be associated with a lack of security privilege in the new version. It now returns these default values. Anyone have any insight, so I don't spend a lot of time tinkering around trying to figure out what has changed? Is this a bug?
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
James -- The results you see in the Debug tab or in a built app will be unchanged, since they depend on the target device. The Simulate tab does have some issues with the window.screen object, it is not setting those values properly, instead, it is showing what your laptop screen values are, which is the proper behavior of the browser implementation for those values (which is what the Simulate tab is, it's a browser pretending to be a device).
You can use the window.innerWidth and window.innerHeight when in the Simulate tab (you can detect the Simulate tab by detecting the presence of window._cordovaSimulate to make the code conditional). See this example screenshot taken from the "hello cordova" sample and the data shown for the device I'm "simulating" in the associated control panel, from the Simulate tab:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had upgraded to 3491. I couldn't even see the device information in the simulator tab as you show it. I had also found that I couldn't build ANYTHING. I had ended up completely uninstalling Intel XDK using a professional grade uninstaller and then reinstalling it from scratch. The development environment now works a LOT and I mean a LOT better. The uninstall doesn't do anything to the project folders.
![](/skins/images/D3C0B914909A6564BBB97F4AD1ED1973/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page