title: Can't drag a textbox properly using jquery
body: <p>I am new to jquery. I am trying to drag and resize a textbox using jquery. But i am facing some problems. I could drag and re-size the text box. But.. just look at the below screenshot.
  <img src="https://i.stack.imgur.com/VaEX1.jpg" alt="enter image description here"></p>
  
  <p>To drag the text box, first i have to drag and move that "Edge" (showed in arrow mark), out of the box. 
  In all mean, it is not a good idea. So can somebody help me to simply drag the textbox?</p>
  
  <p>below is my code</p>
  
  <pre><code>    &lt;html lang="en"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8" /&gt;
    &lt;title&gt;jQuery UI Draggable - Constrain movement&lt;/title&gt;
    &lt;link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /&gt;
    &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
    &lt;script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"&gt;&lt;/script&gt;
    &lt;link rel="stylesheet" href="/resources/demos/style.css" /&gt;
  
  
  &lt;style&gt;
    #containment-wrapper { width: 300px; height:300px; border:2px solid #ccc; padding: 10px; }
    #custombox { width: 160px; height: 30px; padding: 0.5em; float: left; }
  &lt;/style&gt;
  
  &lt;script&gt;
    $(function() 
    {    
      $("#custombox").draggable({ containment: "#containment-wrapper", scroll: false }).resizable(); 
    });
  &lt;/script&gt;
  
  &lt;body&gt;
  
  &lt;div id="containment-wrapper"&gt;
    &lt;div id="custombox" &gt;
      &lt;textarea&gt;&lt;/textarea&gt; &lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>When i tried the code in jsfiddle.net, the textbox is non-dragable. Only resize is possible. But i copied the code to notepad and run it on chrome. Then the problem in the screenshot appeared. 
  After drag the edge outside the textbox, the box can be dragged to anywhere in the containment. </p>