title: Primefaces dialog background opacity doubles when action fails in dialog
body: <p>I have a page modal dialog that gets rendered if a user clicks an edit button. The dialog asks for the username and password and has a submit button. If the username and password do not validate, an error is displayed.</p>
  
  <p>The problem is that if the username and password do not authenticate, the modal background darkens more and more every time the authentication fails.</p>
  
  <p>What would cause that?</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;p:dialog id="dialog" header="Login To Edit" widgetVar="dialog" visible="#{fundingBacker.loginVisible}" modal="true" 
      resizable="false" closable="false" draggable="true" rendered="#{!userBean.loggedIn}"&gt;
      &lt;h:form&gt;
  
          &lt;p:ajaxStatus style="width:16px;height:16px;"&gt;
              &lt;f:facet name="start"&gt;
                  &lt;p:graphicImage value="../images/loading4.gif" /&gt;
              &lt;/f:facet&gt;
              &lt;f:facet name="complete"&gt;
                  &lt;h:outputText value="" /&gt;
              &lt;/f:facet&gt;
          &lt;/p:ajaxStatus&gt;
  
          &lt;p:messages autoUpdate="true" showDetail="true" /&gt;
  
          &lt;h:panelGrid columns="2" cellpadding="5"&gt;
  
              &lt;h:outputLabel for="lanId" value="LanID:" /&gt;
              &lt;p:inputText value="#{currentUser.lanID}" id="lanId" required="true" label="lanId" requiredMessage="Lan ID is required" /&gt;
  
              &lt;h:outputLabel for="password" value="Password:" /&gt;
              &lt;p:password value="#{currentUser.password}" id="password" required="true" label="password" feedback="false" requiredMessage="Password is required" /&gt;
  
              &lt;p:commandButton id="loginButton" value="Login" type="submit" styleClass="primaryButton" action="#{currentUser.performLogin}" update="dialog"/&gt;
  
          &lt;/h:panelGrid&gt;
      &lt;/h:form&gt;
  &lt;/p:dialog&gt;
  </code></pre>