I am facing one issue related to setFocus() method of UIComponent. I have one textinput and I have written textInput.setFocus() on creationComplete of application i.e.
private function onCreationComplete():void {
// 1st approach
textInput.setFocus();
// 2nd approach
textInput.focusManager.setFocus(textInput);
textInput.focusManager.showFocus();
}
While using both the approach, I can see that my text input has got a cursor which shows that it has got focus. But issue is that it doesn’t get any input from keyboard until or unless I click on text input manually.
Is this behaviour normal in Flex or is there any issue with Flash Player which I am using or any issue with browser ?
Flex SDK: 4.1
Browser & Flash Player Version
- IE 9 with Flash Player debugger version 11.3.300.257...
- Chrome 15.0.874.121 with Flash Player 11.1.102.55...
- Firefox 20.0.1 with Flash Player 11.9.900.117...
Can anyone please let me know what is the issue? Any input will be highly appreciated !
Try this,
Hope it helps.