Editor: fix exiting DFW with the keyboard shortcut on Mac (Opt+Ctrl+W).

Fixes #36222.

git-svn-id: https://develop.svn.wordpress.org/trunk@37003 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2016-03-16 02:47:29 +00:00
parent 1046806376
commit 3858c09d02
1 changed files with 8 additions and 3 deletions

View File

@ -887,10 +887,15 @@
}
function fadeOut( event ) {
var key = event && event.keyCode;
var isMac,
key = event && event.keyCode;
// fadeIn and return on Escape and keyboard shortcut Alt+Shift+W.
if ( key === 27 || ( key === 87 && event.altKey && event.shiftKey ) ) {
if ( window.navigator.platform ) {
isMac = ( window.navigator.platform.indexOf( 'Mac' ) > -1 );
}
// fadeIn and return on Escape and keyboard shortcut Alt+Shift+W and Ctrl+Opt+W.
if ( key === 27 || ( key === 87 && event.altKey && ( ( ! isMac && event.shiftKey ) || ( isMac && event.ctrlKey ) ) ) ) {
fadeIn( event );
return;
}