"belltown" wrote:
In the first case, return Invalid. In the second case, I'd have to know more about those "cases in which setFocus() cannot restore the exact focused item".
What?
I think you and me were thinking different things - me, that there be a .getFocusedNode() method that returns currently focused node that can be stored in variable `lastFocusedNode` and then my concern is by the time one gets to use that stored info is unusable (node was detached).
In your case, you are imagining some magical function getLastFocusedNode() that would keep track of what, prior focused nodes? That's confusing to me, what is the definition of "last" - for example if i do .setFocus() on a node that is already focused, does "last" become the same node or does it do special check that it's the "last focused node that is not the current focused one".