Are you currently doing anything to manage the focus, or just relying on the built-in Flex behavior?
You say it works some of the time. Any pattern here? (I.e. Flex apps don't work, Flash apps do?)
I did try to manage the focus at first but the framework does not have a reference to which field was activated in the HTML component. I even tried switching focus to the HTML component hoping it would internaly defer focus to the proper control.
From my experiments it does not work for any flex app. It does work for some flash apps though.
The only thing I can think of is that you will need to manage the focus at each level. This is may only be possible if you have control of the html and embedded Flex app (which it sounds like you do for your most important case). So when you set focus back to the HTML component, it, in turn must set focus to the Flex app (or the last other thing that had focus). You will have to use HTML/JS events and properties to save and restore the focused object. The flex app might also need to set the focus back to the correct, last-focused control (Flex might do this automatically for you, I'm not sure).