5 Replies Latest reply on Mar 23, 2011 7:04 AM by ilya_shaikovsky

    a4j:support focus should NOT select!

    hanafey

      In the view fragment below input from a text field is used to control the data shown in a table. After the ajax update the cursor should remain in the text field so the user can continue entering a substring. It seems this is what the "focus" attribute is for. The problem is the contents of the inputText is selected after the ajax update, so the next character entered clears the field.

      Is this not a bug?

      <h:inputText id="like" value="#{editor.like}" autocomplete="off" title="Enter something here to limit display to matching items">
       <a4j:support event="onkeyup" ajaxSingle="true" reRender="listTableHeading,listTable" focus="like"/>
      </h:inputText>