title: jQuery UI button click event
body: <p>I'm having some very strange behavior with a jQuery UI button. It appears it is happening on chrome only.</p>
  
  <p>I have to click twice to make it work. After further investigation, it seems I had to click outside the text (on the edges of the button), to make it work on first click. I have no elements inside the button - only text.</p>
  
  <p>I am setting the text of the button with jQuery's text() method. When I changed it to html(), it started working as expected.</p>
  
  <p>Although I have found a solution to the issue, I would be very interested in finding out why this happens. Another thing worth mentioning is that I tried to mimic this behavior with <a href="http://jsfiddle.net/tolund/S8D6n/1/" rel="nofollow">jsfiddle</a>, but were unable to. </p>
  
  <p>Code from jsfiddle (stackoverflow requires me to):</p>
  
  <p>Html:</p>
  
  <pre><code>&lt;button&gt;click me&lt;/button&gt;
  </code></pre>
  
  <p>code:</p>
  
  <pre><code>$("button").button().click(function(){ 
      $("body").append("clicked ");
  })
  .text("click me!");
  </code></pre>