title: Unable to select objects after drawing in FabricJS
body: <p>I am trying to free draw rectangle on canvas.</p>
  
  <p>Here's my <a href="http://jsfiddle.net/Subhasish2015/8u1cqasa/2/" rel="nofollow">JSFiddle</a>.</p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>var canvas1 = new fabric.Canvas("canvas2");
  var freeDrawing = true;
  var divPos = {};
  var offset = $("#canvas2").offset();
  $(document).mousemove(function(e) {
      divPos = {
          left : e.pageX - offset.left,
          top : e.pageY - offset.top
      };
  });
  $('#2').click(function() {
  
      console.log("Button 2 cilcked");
  
      // Declaring the variables
      var isMouseDown = false;
      var refRect;
  
      // Setting the mouse events
      canvas1.on('mouse:down', function(event) {
          // Defining the procedure
          isMouseDown = true;
          // Getting yhe mouse Co-ordinates
          // Creating the rectangle object
          if (freeDrawing) {
              var rect = new fabric.Rect({
                  left : divPos.left,
                  top : divPos.top,
                  width : 0,
                  height : 0,
                  stroke : 'red',
                  strokeWidth : 3,
                  fill : ''
              });
              canvas1.add(rect);
              refRect = rect; // **Reference of rectangle object
          }
  
      });
  
      canvas1.on('mouse:move', function(event) {
          // Defining the procedure
  
          if (!isMouseDown) {
              return;
          }
          // Getting yhe mouse Co-ordinates
          if (freeDrawing) {
              var posX = divPos.left;
              var posY = divPos.top;
  
              refRect.setWidth(Math.abs((posX - refRect.get('left'))));
              refRect.setHeight(Math.abs((posY - refRect.get('top'))));
              canvas1.renderAll();
          }
  
      });
  
      canvas1.on('mouse:up', function() {
          // alert("mouse up!");
          isMouseDown = false;
          // freeDrawing=false; // **Disables line drawing
      });
  });
  </code></pre>
  
  <p>The problem that I am facing is after drawing a rectangle I am unable to move, resize or at least select the drawn rectangle.</p>