Issue:
I am facing an issue with scrolling out of application boundaries and trying to find a solution:
(Image source: Prevent scrolling out of CordovaView in Cordova for Windows Phone 8 )
Method #1
body {
overflow: hidden;
-ms-content-zooming: none;
}
The CSS code snippet mentioned above works well in fixing the scrolling issue, but it seems to make the application unstable. The app freezes intermittently, especially when navigating through different views consecutively.
(Source: Prevent scrolling out of CordovaView in Cordova for Windows Phone 8 )
Method #2
This method addresses the horizontal scrolling problem:
@-ms-viewport{width:device-width}
However, it requires the following JavaScript code:
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode(
"@-ms-viewport{width:auto!important}"
)
);
(Source: WP8 IE10 viewport issue )
Looking for a Solution:
I am seeking a way to either stabilize the application with Method #1 or make Method #2 work in the vertical direction. Any suggestions?