src/common/js/winjs/js/ui.js
function _Overlay__focusOnFirstFocusableElement(useSetActive, scroller) {
                    if (this._element.firstElementChild) {
                        var oldFirstTabIndex = this._element.firstElementChild.tabIndex;
                        var oldLastTabIndex = this._element.lastElementChild.tabIndex;
                        this._element.firstElementChild.tabIndex = -1;
                        this._element.lastElementChild.tabIndex = -1;

                        var tabResult = _ElementUtilities._focusFirstFocusableElement(this._element, useSetActive, scroller);

                        if (tabResult) {
                            _Overlay._trySelect(_Global.document.activeElement);
                        }

                        this._element.firstElementChild.tabIndex = oldFirstTabIndex;
                        this._element.lastElementChild.tabIndex = oldLastTabIndex;

                        return tabResult;
                    } else {
                        return false;
                    }
                }
function _Overlay__focusOnFirstFocusableElement(useSetActive, scroller) {
                    if (this._element.firstElementChild) {
                        var oldFirstTabIndex = this._element.firstElementChild.tabIndex;
                        var oldLastTabIndex = this._element.lastElementChild.tabIndex;
                        this._element.firstElementChild.tabIndex = -1;
                        this._element.lastElementChild.tabIndex = -1;

                        var tabResult = _ElementUtilities._focusFirstFocusableElement(this._element, useSetActive, scroller);

                        if (tabResult) {
                            _Overlay._trySelect(_Global.document.activeElement);
                        }

                        this._element.firstElementChild.tabIndex = oldFirstTabIndex;
                        this._element.lastElementChild.tabIndex = oldLastTabIndex;

                        return tabResult;
                    } else {
                        return false;
                    }
                }
function _Overlay__focusOnFirstFocusableElement ( useSetActive , scroller ) { if ( this . _element . firstElementChild ) { var oldFirstTabIndex = this . _element . firstElementChild . tabIndex ; var oldLastTabIndex = this . _element . lastElementChild . tabIndex ; this . _element . firstElementChild . tabIndex = - 1 ; this . _element . lastElementChild . tabIndex = - 1 ; var tabResult = _ElementUtilities . _focusFirstFocusableElement ( this . _element , useSetActive , scroller ) ; if ( tabResult ) { _Overlay . _trySelect ( _Global . document . activeElement ) ; } this . _element . firstElementChild . tabIndex = oldFirstTabIndex ; this . _element . lastElementChild . tabIndex = oldLastTabIndex ; return tabResult ; } else { return false ; } }
Sets focus to what we think is the first tab stop. This element must have a firstDiv with tabIndex equal to the lowest tabIndex in the element and a finalDiv with tabIndex equal to the highest tabIndex in the element. Also the firstDiv must be its first child and finalDiv be its last child. Returns true if successful, false otherwise.
Sets focus to what we think is the first tab stop . This element must have a firstDiv with tabIndex equal to the lowest tabIndex in the element and a finalDiv with tabIndex equal to the highest tabIndex in the element . Also the firstDiv must be its first child and finalDiv be its last child . Returns true if successful false otherwise .