mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Media: Close attachment details modal with esc key.
The event that fired closing the attachment details modal also removed the keydown event listener, so subsequent modals could not be closed with the escape key. Props vondelphia, sourovroy, sabernhardt Fixes #53924. git-svn-id: https://develop.svn.wordpress.org/trunk@51945 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -138,8 +138,8 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
|
||||
// Enable page scrolling.
|
||||
$( 'body' ).removeClass( 'modal-open' );
|
||||
|
||||
// Hide modal and remove restricted media modal tab focus once it's closed.
|
||||
this.$el.hide().off( 'keydown' );
|
||||
// Hide the modal element by adding display none.
|
||||
this.$el.hide();
|
||||
|
||||
/*
|
||||
* Make visible again to assistive technologies all body children that
|
||||
|
||||
Reference in New Issue
Block a user