elementWithFocus_ = newElement;
final boolean ie = getWebClient().getBrowserVersion().isIE();
if (ie && elementWithFocus_ instanceof SelectableTextInput) {
final SelectableTextInput sti = (SelectableTextInput) elementWithFocus_;
setSelectionRange(new SimpleRange(sti, sti.getSelectionStart(), sti, sti.getSelectionEnd()));
}
if (elementWithFocus_ != null) {
elementWithFocus_.focus();
elementWithFocus_.fireEvent(Event.TYPE_FOCUS);