I'm loading a remote url inside a webview, and I need to disable the safari bounce effect on it.
I tried to load the e.preventDefault() on the beforeload and load event, but with no effect:
webview.addEventListener("load", function() { webview.evalJS("'document.addEventListener('touchmove', function(e) { e.preventDefault(); }, false);'"); })I even tried to load a local html file with an iframe containing the remote page, but if I put the iframe inside the page, the preventDefault stops working:
<head> <script type="text/javascript"> document.ontouchmove = function(e){ e.preventDefault(); } </script> </head> <body> <IFRAME SRC="http://www.google.com" width="768" height="800"> </IFRAME> </body>I'm stuck. Does anyone manage to solve this? I have looked through the Q&A but I didn't get any answer.
platform: iOS TiSDK: 1.8.x
1 Answer
did you try modifying the DOM of the page after it is loaded it to included the code included above?
Your Answer
Think you can help? Login to answer this question!