DFW: Properly handle Esc key when the content is focused or when switching browser tabs.
props avryl. fixes #28279. Built from https://develop.svn.wordpress.org/trunk@28443 git-svn-id: http://core.svn.wordpress.org/trunk@28270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -510,10 +510,10 @@
|
||||
}
|
||||
});
|
||||
|
||||
$document.on( 'keydown.wp-fullscreen', function( event ) {
|
||||
if ( 27 === event.which && s.visible ) { // Esc
|
||||
$( window ).on( 'keyup', function( event ) {
|
||||
// Turn fullscreen off when Esc is pressed.
|
||||
if ( 27 === event.keyCode && s.visible ) {
|
||||
api.off();
|
||||
event.stopImmediatePropagation();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
2
wp-admin/js/wp-fullscreen.min.js
vendored
2
wp-admin/js/wp-fullscreen.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user