[
http://jira.jboss.com/jira/browse/RF-1938?page=comments#action_12395716 ]
Nick Belaevski commented on RF-1938:
------------------------------------
ontabenter is cancelable event, so the code is setting focus just before newly selected
tab becomes visible. As a workaround you can use:
ontabenter="setTimeout(function()
{document.getElementById('forma:input2').focus();}, 0);"
tab ontabenter problem
----------------------
Key: RF-1938
URL:
http://jira.jboss.com/jira/browse/RF-1938
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.0
Reporter: Tomislav Jakopec
Assigned To: Nick Belaevski
Fix For: 3.2.0
This is my example
<f:view>
<html>
<body>
<h:form id="forma">
<r:tabPanel switchType="client">
<r:tab label="first"
ontabenter="document.getElementById('forma:input1').focus();">
<t:inputText id="input1" />
</r:tab>
<r:tab label="second"
ontabenter="document.getElementById('forma:input2').focus();">
<t:inputText id="input2" />
</r:tab>
</r:tabPanel>
</h:form>
</body>
</html>
</f:view>
When I click on second tab it doesn't set focus on input2. It set focus on input2
when I press tab second time. Same thing is with firstTab.
So, I have to press tab name twice to get desirable behavior - setting focus on element.
I will like to press tab name once, tabPanel show me pressed tab content and focus element
form ontabenter directiv
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira