takes focus to first item (after buttons)
324387
def goto_first_item
      bc = @buttons.count
      @components[bc..-1].each { |c| 
        if c.focusable
          leave_current_component
          @current_component = c
          set_form_row
          break
        end
      }
    end
764976
function() {
			var self = this;
			if (self.settings.mode === 'single') return;
	
			self.$activeItems = Array.prototype.slice.apply(self.$control.children(':not(input)').addClass('active'));
			if (self.$activeItems.length) {
				self.hideInput();
				self.close();
			}
			self.focus();
		}
794718
@Override
    public final void onLeaveFocus(FocusChangeDirection direction, Interactable nextInFocus) {
        inFocus = false;
        afterLeaveFocus(direction, nextInFocus);
    }
840901
function ( event ) {
			if ( ! focusArea ) {
				return;
			}
			var style = myStyles [ event.target.styleRange ];
			var bDouble = style.HTMLAfter && 0 < style.HTMLAfter.length;
			var selectionStart = focusArea.selectionStart;
			var selectionEnd = focusArea.selectionEnd;
			var oldText = focusArea.value;
			focusArea.value = oldText.substring ( 0, selectionStart ) + 
				( bDouble ? style.HTMLBefore + oldText.substring ( selectionStart, selectionEnd ) + style.HTMLAfter : style.HTMLBefore ) + 
				oldText.substring ( selectionEnd );
			focusArea.setSelectionRange ( 
				bDouble || selectionStart === selectionEnd ? selectionStart + style.HTMLBefore.length : selectionStart,
				( bDouble ? selectionEnd : selectionStart ) + style.HTMLBefore.length );
			focusArea.focus ( );
		}
418259
public function focus()
    {
        if (\in_array($this->attribs['type'], array('checkbox', 'radio'))) {
            $keys = \array_keys($this->props['options']);
            $this->props['options'][ $keys[0] ]['autofocus'] = true;
        } else {
            $this->attribs['autofocus'] = true;
        }
    }
122821
def focus_next_sibling(self):
        """"""
        mid = self.get_selected_mid()
        newpos = self._tree.next_sibling_position(mid)
        if newpos is not None:
            newpos = self._sanitize_position((newpos,))
            self.body.set_focus(newpos)
924115
function (start, end) {
            if (!this._hasFocus) {
                return;
            }

            var ctrl = this.getTextInputField();
            ariaUtilsCaret.setPosition(ctrl, start, end);
        }
637690
function () {
        var that = this,
            events = 'mouseover focus keydown',
            timer,
            callback = function () {
                that.initializer.resolve();
                that.enable();
            };

        that.initializer.always(function(){
            that.el.off(events, callback);
            clearInterval(timer);
        });

        that.disabled = true;
        that.el.on(events, callback);
        timer = setInterval(function(){
            if (that.el.is(':visible')) {
                callback();
            }
        }, that.options.initializeInterval);
    }
887354
function (type, args, obj) {

            var aButtons = this.cfg.getProperty("buttons"),
                el = this.lastFormElement;

            if (args && args[1]) {
                Event.stopEvent(args[1]);
            }

            if (aButtons && Lang.isArray(aButtons)) {
                this.focusLastButton();
            } else {
                if (el) {
                    try {
                        el.focus();
                    } catch(oException) {
                        // Ignore
                    }
                }
            }
        }
310847
function focusToFirstTd(sq, range, $tr, tableMgr) {
  const nextFocusCell = $tr.find('td').get(0);
  range.setStart(nextFocusCell, 0);
  range.collapse(true);

  tableMgr.setLastCellNode(nextFocusCell);
  sq.setSelection(range);
}
786282
function focusFirst(targetControl) {
        var navigationRoot = getNavigationRoot(targetControl);
        var focusElements = getFocusElements(navigationRoot.getEl());

        if (navigationRoot.settings.ariaRemember && "lastAriaIndex" in navigationRoot) {
          moveFocusToIndex(navigationRoot.lastAriaIndex, focusElements);
        } else {
          moveFocusToIndex(0, focusElements);
        }
      }
1011451
function enter(aria) {
        aria = aria || {};
        focusedControl.fire('click', { target: focusedElement, aria: aria });
      }
421250
def shift_select(self, first_element, last_element):
        
        self.click(first_element)
        self.shift_click(last_element)
1188342
def focus_first_child(self):
        """"""
        w, focuspos = self.get_focus()
        child = self._tree.first_child_position(focuspos)
        if child is not None:
            self.set_focus(child)
994230
function setFocus (hash) {
    var element = document.getElementById(hash.substring(1))

    if (element) {
      if (!/^(?:a|select|input|button|textarea)$/i.test(element.tagName)) {
        element.tabIndex = -1
      }

      element.focus()
    }
  }
24057
function left() {
        var parentRole = getParentRole();

        if (parentRole == "tablist") {
          moveFocus(-1, getFocusElements(focusedElement.parentNode));
        } else if (focusedControl.parent().submenu) {
          cancel();
        } else {
          moveFocus(-1);
        }
      }
1082866
def goto_last_item
      bc = @buttons.count
      f = nil
      @components[bc..-1].each { |c| 
        if c.focusable
          f = c
        end
      }
      if f
        leave_current_component
        @current_component = f
        set_form_row
      end
    end