fixes for Element.focus

Element.focus() didn't set focus but appears to be used pretty
consistently by the rest of the code to set the focus.  This patch
makes that happen
allows for tab to exit the input focus of a textarea if inputOnFocus is set