The id of the current focus is stored in the variable currentFocus. This variable is passed to the server as ice.focus on a submit. After the DOM update comes back, focus is re-applied by the framework. This process works fine when all the focus/blur event handling and DOM changes are done by the framework. It starts to break down when YUI does its own focus/blur event handling and DOM changes.
Therefore, the component needs to make sure that the correct value is set in currentFocus/ice.focus before the submit, and re-applies the correct focus (if the focus is within the component) after the DOM update comes back.
See tab set, slider entry and date time entry for examples.
Read some focus management code in bridge. There are variables (currentFocus, ice.focus, etc) for tracking focus and passing focus states to server. Also, slider entry and tab set seem to use such variables for some focusing. Need to study further to see if same techniques can be used in date time entry.