src/aria/popups/PopupManager.js
function (event) {
                var domEvent = new ariaDomEvent(event);
                var target = domEvent.target;
                var self = this;
                var popup = this.findParentPopup(target, function (popup) {
                    var navigation;
                    navigation = self._viewportNavigationInterceptor.getNavigationInformation(target);
                    if (navigation == null) {
                        navigation = popup.getNavigationInformation(target);
                    }

                    var eventObject = {
                        name: "beforePreventingFocus",
                        event: domEvent,
                        modalPopup: popup,
                        cancel: false,
                        navigation: navigation
                    };
                    self.$raiseEvent(eventObject);
                    if (!eventObject.cancel) {
                        var direction;
                        if (navigation != null) {
                            direction = navigation.direction;
                        }
                        if (direction == null) {
                            direction = 'forward';
                        }

                        var reverse = !!(direction === 'backward');
                        ariaTemplatesNavigationManager.focusFirst(popup.domElement, reverse);
                        return popup;
                    }
                    // if the focus is allowed, don't return any popup to bring to the front
                });
                if (popup) {
                    this.bringToFront(popup);
                }
                domEvent.$dispose();
            }
function (event) {
                var domEvent = new ariaDomEvent(event);
                var target = domEvent.target;
                var self = this;
                var popup = this.findParentPopup(target, function (popup) {
                    var navigation;
                    navigation = self._viewportNavigationInterceptor.getNavigationInformation(target);
                    if (navigation == null) {
                        navigation = popup.getNavigationInformation(target);
                    }

                    var eventObject = {
                        name: "beforePreventingFocus",
                        event: domEvent,
                        modalPopup: popup,
                        cancel: false,
                        navigation: navigation
                    };
                    self.$raiseEvent(eventObject);
                    if (!eventObject.cancel) {
                        var direction;
                        if (navigation != null) {
                            direction = navigation.direction;
                        }
                        if (direction == null) {
                            direction = 'forward';
                        }

                        var reverse = !!(direction === 'backward');
                        ariaTemplatesNavigationManager.focusFirst(popup.domElement, reverse);
                        return popup;
                    }
                    // if the focus is allowed, don't return any popup to bring to the front
                });
                if (popup) {
                    this.bringToFront(popup);
                }
                domEvent.$dispose();
            }
function ( event ) { var domEvent = new ariaDomEvent ( event ) ; var target = domEvent . target ; var self = this ; var popup = this . findParentPopup ( target , function ( popup ) { var navigation ; navigation = self . _viewportNavigationInterceptor . getNavigationInformation ( target ) ; if ( navigation == null ) { navigation = popup . getNavigationInformation ( target ) ; } var eventObject = { name : "beforePreventingFocus" , event : domEvent , modalPopup : popup , cancel : false , navigation : navigation } ; self . $raiseEvent ( eventObject ) ; if ( ! eventObject . cancel ) { var direction ; if ( navigation != null ) { direction = navigation . direction ; } if ( direction == null ) { direction = 'forward' ; } var reverse = ! ! ( direction === 'backward' ) ; ariaTemplatesNavigationManager . focusFirst ( popup . domElement , reverse ) ; return popup ; } // if the focus is allowed, don't return any popup to bring to the front } ) ; if ( popup ) { this . bringToFront ( popup ) ; } domEvent . $dispose ( ) ; }
Callback after the focus is put on an element in the document, when a modal popup is displayed.
@param {Object} event The DOM focusin event triggering the callback
Callback after the focus is put on an element in the document when a modal popup is displayed .