title: Error when opening a jquery dialog on a textfield focus event
body: <p>I have a dynamic textfield and i am binding it to focus event to open a dialog.</p>
  
  <pre><code>$('#formtable').on('focus', '#textbox1', function (e) {                        
   callOpenDialog('Dialog');             
  });
  </code></pre>
  
  <p>where formtable is div container for the textfield and the function is defined as</p>
  
  <pre><code>function callOpenDialog(title)
  {
   $("#Dialog").dialog({
          title: title,
          resizable: false,
          modal: true,
          height: 300,
          width: 300,           
          position: 'top'                      
      });
  } 
  </code></pre>
  
  <p>The problem is that:
  1) On textfield focus, the dialog opens but the focus remains to the textfield itself.i want the focus to the dialog;
  2)On closing the dialog an error is shown as
  Uncaught TypeError: Cannot call method '_focusTabbable' of null </p>
  
  <p>however when i bind to click event it works properly but i have to do it on focus event.</p>
  
  <p>I tried using</p>
  
  <pre><code>e.preventDefault() 
  or 
  $("#Dialog").focus()
  </code></pre>
  
  <p>but to no avail.
  Please help.</p>