title: PrimeFaces inputText ajax event=valueChange fires AFTER commandButton clicked
body: <p>Using JSF and PrimeFaces 6.1 I have an inputText field as such:</p>
  
  <pre><code>&lt;p:inputText value="#{backingBean.stringField}"&gt;
      &lt;p:ajax event="valueChange" update="@form" /&gt;
  &lt;/p:inputText&gt;
  </code></pre>
  
  <p>and within the same form is a commandButton:</p>
  
  <pre><code>&lt;p:commandButton id="btnDoThatThing" 
                   ajax="true" 
                   immediate="true"
                   update="@form"
                   process="@this"
                   action="#{backingBean.doThatThing}"/&gt;
  </code></pre>
  
  <p>When I </p>
  
  <ol>
  <li>make a change to the inputText field,</li>
  <li>then click somewhere OTHER THAN the command button</li>
  <li>click the command button</li>
  </ol>
  
  <p>everything works exactly as expected. BUT if I:</p>
  
  <ol>
  <li>make a change to the inputText field,</li>
  <li>immediately the command button </li>
  </ol>
  
  <p>the button is NOT fired since the first click of the commandButton is triggering the valueChange event to happen in the inputText field. </p>
  
  <p>if I click it a second time the button action finally happens.</p>
  
  <p>now, if i change the <code>p:ajax event="valueChange"</code> to <code>p:ajax event="keyup"</code> the first click of the commandButton work as expected, but unfortunately the keyup event on a inputField is pretty hacky and you lose  functionality within the field (copy/paste text, text selection, 'fast' typing' etc)</p>
  
  <p>any thoughts on how to initiate the change event in the inputText field, AND fire the commandButton action when the user clicks the button immediately from typing in the inputText field?</p>
  
  <p>thanks for your time!</p>