JavaScript Unable to disable bounce in a html with Swiffy object

i have a html file converted by swiffy that looks like this:

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Swiffy output</title>
    <script src="https://www.gstatic.com/swiffy/v5.2/runtime.js"></script>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="viewport" content="width=device-width, target-densityDpi=device-dpi, initial-scale=1.0, user-scalable=no, maximum-scale=1.0">
    <script>
        function stopScrolling( touchEvent ) { alert("wa");touchEvent.preventDefault(); }
        document.addEventListener('touchstart', stopScrolling , false );
        document.addEventListener('touchmove', stopScrolling , false );
    </script>
    <script>
      swiffyobject = ...........
    </script>
    <style>html, body {width: 100%; height: 100%}</style>
  </head>

  <body style="margin: 0;">
    <div id="swiffycontainer" style="width: 100%; height: 100%">
    </div>
    <script>
      var stage = new swiffy.Stage(document.getElementById('swiffycontainer'),
                                   swiffyobject);

      stage.start();
    </script>
  </body>
</html>

When view this page in iPhone, the website keeps bouncing in Safari and prevents me from doing more advanced touch detection.

I searched on stackoverflow and most answers suggested the same thing: listen to touchstart/touchmove and call preventDefault.

As shown above i have implemented tat but it doesnt seem to be working at all.

Any help? How can I prevents the bouncing in safari?

Answer:1

I have built apache cordova using the npm functions and have opened it in Eclipse, I have edited it and so far the changes seem to be working okay. I want to now set up some bindings on the buttons I ...

I have built apache cordova using the npm functions and have opened it in Eclipse, I have edited it and so far the changes seem to be working okay. I want to now set up some bindings on the buttons I ...

  1. detect apache struts
  2. detect apache version
  3. detect apache version remotely
  4. detect apache version online
  5. detect apache struts version
  6. detect apache struts vulnerability
  7. detect apache tomcat version
  8. detect apache
  9. detect apache version nmap
  10. detect apache attack
  11. detect apache config
  12. detect apache webserver

Given access to valid audio files : <audio src="https://upload.wikimedia.org/wikipedia/commons/9/9b/Zh-Tianjin.ogg"></audio> <audio src="https://upload.wikimedia.org/wikipedia/commons/...

Given access to valid audio files : <audio src="https://upload.wikimedia.org/wikipedia/commons/9/9b/Zh-Tianjin.ogg"></audio> <audio src="https://upload.wikimedia.org/wikipedia/commons/...

I would like it so that the as the user scrolls down the page and hits certain "sticky" elements, they add themselves to the top of the page. I.e., let's say the page has a fixed, 10px high element ...

I would like it so that the as the user scrolls down the page and hits certain "sticky" elements, they add themselves to the top of the page. I.e., let's say the page has a fixed, 10px high element ...

  1. jquery vs other javascript frameworks
  2. jquery and other javascript frameworks
  3. jquery breaks another javascript
  4. jquery use other javascript
  5. jquery conflict with other javascript
  6. jquery run after all other javascript

Just made a simple controller with some injection. var SimpleProductListController = BaseController.extend({ _notifications:null, _productsModel:null, init:function($scope,...

Just made a simple controller with some injection. var SimpleProductListController = BaseController.extend({ _notifications:null, _productsModel:null, init:function($scope,...

  1. what is angular js
  2. what is angular velocity
  3. what is angular acceleration
  4. what is angular 2
  5. what is angular directive
  6. what is angular component
  7. what does angular mean
  8. what is angular 4
  9. what is angular.json
  10. what is angular service
  11. what is angular observable
  12. what is angular zone
  13. what is angular router
  14. what is angular controller
  15. what is angular template
  16. what is angular typescript
  17. what is angular promise
  18. what is angular subscribe
  19. what is angular viewchild
  20. what is angular injector