mx:application initialize="onLoad(event)"
...
import flash.external.ExternalInterface;
private function onLoad(event:Event):void {
ExternalInterface.call('setBrowserFocus');
this.myCanvas.setFocus();
}
2. add javascript "setBrowserFocus ()" into index.template.html
function setBrowserFocus(){
document.getElementById('${application}').focus();
}
3. test again.
source: http://carrythezero.net/blog/2009/01/20/flex-textinput-focus-issues/
沒有留言:
張貼留言