packages/cdp-mobile/dist/cdp.js
function( theEvent ) {
        var target,
            targetElement = theEvent.target,
            ui = this._ui;

        if ( !this._isOpen ) {
            return;
        }

        if ( targetElement !== ui.container[ 0 ] ) {
            target = $( targetElement );
            if ( !$.contains( ui.container[ 0 ], targetElement ) ) {
                $( this.document[ 0 ].activeElement ).one( "focus", $.proxy( function() {
                    this._safelyBlur( targetElement );
                }, this ) );
                ui.focusElement.focus();
                theEvent.preventDefault();
                theEvent.stopImmediatePropagation();
                return false;
            } else if ( ui.focusElement[ 0 ] === ui.container[ 0 ] ) {
                ui.focusElement = target;
            }
        }

        this._ignoreResizeEvents();
    }
function( theEvent ) {
        var target,
            targetElement = theEvent.target,
            ui = this._ui;

        if ( !this._isOpen ) {
            return;
        }

        if ( targetElement !== ui.container[ 0 ] ) {
            target = $( targetElement );
            if ( !$.contains( ui.container[ 0 ], targetElement ) ) {
                $( this.document[ 0 ].activeElement ).one( "focus", $.proxy( function() {
                    this._safelyBlur( targetElement );
                }, this ) );
                ui.focusElement.focus();
                theEvent.preventDefault();
                theEvent.stopImmediatePropagation();
                return false;
            } else if ( ui.focusElement[ 0 ] === ui.container[ 0 ] ) {
                ui.focusElement = target;
            }
        }

        this._ignoreResizeEvents();
    }
function ( theEvent ) { var target , targetElement = theEvent . target , ui = this . _ui ; if ( ! this . _isOpen ) { return ; } if ( targetElement !== ui . container [ 0 ] ) { target = $ ( targetElement ) ; if ( ! $ . contains ( ui . container [ 0 ] , targetElement ) ) { $ ( this . document [ 0 ] . activeElement ) . one ( "focus" , $ . proxy ( function ( ) { this . _safelyBlur ( targetElement ) ; } , this ) ) ; ui . focusElement . focus ( ) ; theEvent . preventDefault ( ) ; theEvent . stopImmediatePropagation ( ) ; return false ; } else if ( ui . focusElement [ 0 ] === ui . container [ 0 ] ) { ui . focusElement = target ; } } this . _ignoreResizeEvents ( ) ; }
When the popup is open, attempting to focus on an element that is not a child of the popup will redirect focus to the popup
When the popup is open attempting to focus on an element that is not a child of the popup will redirect focus to the popup