Break out this function so it can be used with libRocket
Don't close anything if no elements in focus
Add a function to convert from Rocket to Quake