1 Reply Latest reply on Apr 9, 2011 8:29 PM by Rocky S

    <a4j:support event="onkeyup" focus=problem

    Júlio Adrian Miño Van Helden Newbie

      Hi Guys,


      i am facing the same problem reported by Benno  in June 2008 (https://issues.jboss.org/browse/RF-3632?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel).


      It seems that this issue was addressed to be fixed in the future (https://issues.jboss.org/browse/RF-4404).


      If i use the <a4j:support event="onkeyup" focus="thisInput" reRender="otherInput, thisInput"> tag, after de Ajax reRendering, the whole text in "thisInput"  is selected.


      The problem is, when the user press another keyboard key, he looses the previous text.


      I tried several approaches, without using the focus attribute and trying to put the focus in the input with JQuery, but it seems the DOM refresh (reRendering) occurs before or in the same time the Ajax response.


      Is there a workaround for this ? Using JQuery, JSF 2.0, Richfaces 3.3.3... The strategie doesn't matter, i would like to solve this issue in my application.


      By the way, i am using Richfaces 3.3.3.


      Best Regards.