title: Phonegap textarea scrolling
body: <p>I have a phonegap app where I have disabled the scrolling of the webview by applying document touch move and prevent.default();</p>
  
  <p>The problem is that I have two text areas that I would like to scroll if the text overflows. The prevent default interferes with this. </p>
  
  <p>I've tried several work arounds with mixed results and the best so far being the following function to detect the x and y of the touch move event and only applying prevent default if it falls outside of the text areas. </p>
  
  <pre><code>function preventBehavior(e) 
  { 
      console.log("event.targetTouches[0].pageX = " + event.targetTouches[0].pageX + " event.targetTouches[0].pageY = " + event.targetTouches[0].pageY);
  
      var x = event.targetTouches[0].pageX;
      var y = event.targetTouches[0].pageY;
  
      //fix the scroll of textareas for iOS by avoiding prevent default in them 
      if (x &gt; 20 &amp;&amp; x &lt; 300 &amp;&amp; y &gt; 80 &amp;&amp; y &lt; 230){
          //touch falls within first text area
      }else if (x &gt; 20 &amp;&amp; x &lt; 300 &amp;&amp; y &gt; 245 &amp;&amp; y &lt; 400){
          //touch falls within second text area
      }else{
          e.preventDefault(); 
      }
  };
  document.addEventListener("touchmove", preventBehavior, false);
  </code></pre>
  
  <p>The problem now is that if the text area does not require scrolling then it scrolls the entire web app.</p>
  
  <p>Does anyone has a definitive fix for this problem?</p>
  
  <p>Thanks in advance.</p>