Make WordPress Core

Ticket #23560: 23560.26.diff

File 23560.26.diff, 1.7 KB (added by gcorne, 9 years ago)
  • src/wp-includes/js/media-views.js

    diff --git src/wp-includes/js/media-views.js src/wp-includes/js/media-views.js
    index fa8a7c7..6782aa6 100644
     
    25042504
    25052505                                                // Keep focus inside media modal
    25062506                                                // after canceling a gallery
    2507                                                 new media.view.FocusManager({
    2508                                                         el: this.el
    2509                                                 }).focus();
     2507                                                this.controller.modal.focusManager.focus();
    25102508                                        }
    25112509                                },
    25122510                                separateCancel: new media.View({
     
    26952693
    26962694                                        // Keep focus inside media modal
    26972695                                        // after jumping to gallery view
    2698                                         new media.view.FocusManager({
    2699                                                 el: this.el
    2700                                         }).focus();
     2696                                        this.controller.modal.focusManager.focus();
    27012697                                }
    27022698                        });
    27032699                },
     
    27272723
    27282724                                        // Keep focus inside media modal
    27292725                                        // after jumping to playlist view
    2730                                         new media.view.FocusManager({
    2731                                                 el: this.el
    2732                                         }).focus();
     2726                                        this.controller.modal.focusManager.focus();
    27332727                                }
    27342728                        });
    27352729                },
     
    27592753
    27602754                                        // Keep focus inside media modal
    27612755                                        // after jumping to video playlist view
    2762                                         new media.view.FocusManager({
    2763                                                 el: this.el
    2764                                         }).focus();
     2756                                        this.controller.modal.focusManager.focus();
    27652757                                }
    27662758                        });
    27672759                },
     
    61716163
    61726164                        // Keep focus inside media modal
    61736165                        // after clear link is selected
    6174                         new media.view.FocusManager({
    6175                                 el: this.el
    6176                         }).focus();
     6166                        this.controller.modal.focusManager.focus();
    61776167                }
    61786168        });
    61796169
     
    65266516                                this.model.destroy();
    65276517                                // Keep focus inside media modal
    65286518                                // after image is deleted
    6529                                 new media.view.FocusManager({
    6530                                         el: this.el
    6531                                 }).focus();
     6519                                this.controller.modal.focusManager.focus();
    65326520                        }
    65336521                },
    65346522                /**