title: Primefaces dialog doesn't close the second time
body: <p>I use a dialog to show newsletters. The first time, everything goes ok: the dialog pops up and it can be closed using the X and using the extra button 'close'</p>
  
  <pre><code>            &lt;h:form id="frmDialog"&gt;
              &lt;p:dialog header="...: NEWS :..."
                        widgetVar="widgetInfo" modal="true" dynamic="true"&gt; 
                  &lt;p:commandButton  value="close" onclick="widgetInfo.hide();"/&gt;
                  &lt;p:outputPanel id="pnlNewsLetter" style="width:610px;"&gt;                                        
                      &lt;ui:include src="#{corporateManager.newsLetter}"/&gt;
                  &lt;/p:outputPanel&gt;
              &lt;/p:dialog&gt;
          &lt;/h:form&gt;
  </code></pre>
  
  <p>....
  When I click the button to reopen the same dialog, it opens, but can't be closed. In stead of closing, hitting the X button or the 'close' button, the entire content of the dialog gets selected and the page becomes inresponsive
  .....</p>
  
  <pre><code>          &lt;h:form&gt;
              &lt;h:commandButton  image="/newsletters/img/1karel.png" onclick="widgetInfo.show();"&gt;
              &lt;f:ajax render=":frmDialog:pnlNewsLetter"/&gt;
              &lt;f:setPropertyActionListener value="/newsletters/2012-12-21.html" target="#{corporateManager.newsLetter}"/&gt;
           &lt;/h:commandButton&gt;&lt;/h:form&gt;
  </code></pre>
  
  <p>..... i've tried using p:commandButton, using oncomplete(), closable="false", used h:button, added/removed form-tags or id's etc...</p>
  
  <p>Environment: Glasfish3.1.2 - Netbeans 7.3 - Primefaces 3.1 - Google Chrome 27.0.1453.94 m</p>