title: Changing the text on a jquery dialog button affects button height
body: <p>I have a jquery modal dialog, and I am trying to change the text shown on a button after it is clicked. So, for example, the Send button gets changed to 'Sending...' and is disabled when it is clicked. </p>
  
  <p>This all works fine, with one problem: the button loses all of its internal padding, and the button border wraps right around the text. </p>
  
  <pre><code>$('#email-dialog').dialog({
      autoOpen: false,
      height: 'auto',
      width: 'auto',
      modal: true,
      buttons: {
          "Send": function() {
              $(".ui-dialog-buttonpane button:contains('Send')").button("disable");
              $(".ui-dialog-buttonpane button:contains('Send')").button().html('Sending...');
  
              $.ajax({
                  type: "POST",
                  url: post_path,
                  data: form_data,
                  dataType: 'JSON',
                  success: function(data) {
                      if (data.success) {
                          $("#email-dialog").dialog("close");
                      } else {
                          updateErrors(data.errors);
                          $(".ui-dialog-buttonpane button:contains('Sending...')").button("enable");
                          $(".ui-dialog-buttonpane button:contains('Sending...')").button().text('Send');
                      }
                  },
                  error: function(XMLHttpRequest, textStatus, errorThrown) {
                      alert('Error: ' + textStatus + ' ' + errorThrown);
                      $(".ui-dialog-buttonpane button:contains('Sending...')").button("enable");
                      $(".ui-dialog-buttonpane button:contains('Sending...')").button().text('Send');
                  }
              });
  
          },
          Cancel: function() {
              $(this).dialog("close");
          }
      },
      close: function() {
          allFields.val("").removeClass("ui-state-error");
      }
  });
  </code></pre>
  
  <p>I have tried with both the html() and text() methods. Am I missing something really obvious here?</p>