title: richfaces text and text area on rerender unable to use keyboard up and down arrow keys to move the cursor
body: <p>I am using RichFaces 3.3.2 and JSF 1.2.</p>
  
  <p>Scenario:</p>
  
  <p>In my application when the user enters some text in a text field or a text area we have to enable the apply button. For this we are using rerender 'onkeyup' event.
  Validation error mesage should be shown when user enters invalid date</p>
  
  <p><strong>JSF Page code:</strong></p>
  
  <pre><code> &lt;h:inputText id="input"  required="true" requiredMessage="Value cann't be null" 
   value="#{client.Value}" validatorMessage="Value should be between 0 and         999999999999.99"  valueChangeListener="#{myHandler.onChange}" maxlength="30"&gt;
    &lt;f:validateDoubleRange minimum="0" maximum="999999999999.99"/&gt;
     &lt;a4j:support event="onkeyup" eventsQueue="A4JQueue"          reRender="outputPanel_btn_save"&gt;&lt;/a4j:support&gt;
  </code></pre>
  
  <p><strong>Apply button code:</strong></p>
  
  <pre><code> &lt;a4j:outputPanel id="outputPanel_btn_save"&gt;
   &lt;a4j:commandButton value="#{msg.btn_Apply}" id="applyButton"  reRender="outputPanel_btn_save" eventsQueue="A4JQueue" disabled="#{myHandler.isApplyButtonDisabled}" styleClass="button" action="#{myHandler.update}"&gt;
   &lt;/a4j:commandButton&gt;
   &lt;/a4j:outputPanel&gt;
  </code></pre>
  
  <p><strong>Backing bean code for myHandler.onChange()</strong></p>
  
  <pre><code> MyHandler {
    public void onChange(ValueChangeEvent event) {
      Iterator&lt;FacesMessage&gt; facesMessages = getFacesContext().getMessages();
      boolean isMessagePresent=false;
      while(facesMessages.hasNext()){
         FacesMessage message = facesMessages.next();
         isMessagePresent=true;
         break;
      }
  
  if (event != null
      &amp;&amp; event.getNewValue() != event.getOldValue()&amp;&amp; !isMessagePresent) {
          this.isApplyButtonDisabled = Boolean.FALSE;
      }
      if(isMessagePresent){
          this.isApplyButtonDisabled = Boolean.TRUE;
      }
  }
  
  
  }
  </code></pre>
  
  <p><strong>Problem:</strong>
  When the user enters some text onkeyup event we are rerendering the apply button. Due to   rerender keyboard arrow keys are not working as the field is loosing it's focus onKeyup event.
  I tried using JS to enable the apply button, when user enters some text. But then JSF validations are not being executed and no validation message are being displayed.</p>
  
  <p><strong>Question:</strong>
   Can you suggest a way to enable the apply button with out loosing focus on the text field / text area and also JSF validations should be executed / displayed? </p>