title: Dialog does not do autoposition
body: <p>I use dialog from jQuery UI. On my website, content of the dialog is changing dynamically (custom autocomplete of typed text). I already set css <code>max-height: 90%;</code> on dialog, so on a long content, dialog should be fully visible. But, when dynamic content as automplete is generated, dialog is resized, but still in same position, so 40% of content is not visible, it os out of screen. How can I fix that, when long content is generated, dialog will be autpositioned to the middle of screen?</p>
  
  <p><strong>EDIT 1:</strong></p>
  
  <p>Here is litle part of code from my website:</p>
  
  <pre><code>$.ajax({
      cache: false,
      type: 'GET',
      'url': URL_SAVE.expandVariables({}, {
         'pres': self
      }),
      success: function(data) {
         var label = $('&lt;label&gt;Open file:&lt;label&gt;').appendTo(dialogElement);
         dt = data;
         input = $('&lt;input type="text" /&gt;').appendTo(dialogElement).autocomplete({
            source: data,
            autoFocus: true,
            minLength: 0
         });
         dialog.open();
      }
   });
  </code></pre>
  
  <p>Here is demo, what is so similar to original <a href="http://jsfiddle.net/debute/P4vk5/" rel="nofollow">jsFiddle</a></p>
  
  <p><strong>EDIT 2:</strong></p>
  
  <p>This is initialization code for dialog:</p>
  
  <pre><code>var dialogElement = $('&lt;div&gt;&lt;/div&gt;'),
      input, dt, self = {
         serverEditor: server('editor')
      }, dialog = new Dialog(dialogElement, 'Open', {
         'saveable': 'Open',
         'width': 400,
         'saveOnlyIf': function() {
            return dt.has(input.val());
         },
         'ifNotSaved': function() {
            alert('Please choose correct file name!');
         }
      }).on('save', function() {
         $.ajax({
            'type': 'GET',
            'url': URL_SAVE.expandVariables({}, {
               'pres': self
            }) + input.val(),
            'success': function(data) {
               Presentation.unserialize(data);
            }
         });
      });
  </code></pre>