TinyMCE: don't access the parent window when opening the (iframe based) Help/Keyboard Shortcuts modal. Fixes #20094.

Built from https://develop.svn.wordpress.org/trunk@29449


git-svn-id: http://core.svn.wordpress.org/trunk@29227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-08-08 21:18:16 +00:00
parent 4deee321e3
commit 13aee01e2b
1 changed files with 2 additions and 4 deletions

View File

@ -95,10 +95,8 @@ header('Content-Type: text/html; charset=' . get_bloginfo('charset'));
</head>
<body class="windows wp-core-ui">
<script type="text/javascript">
var win = window.dialogArguments || opener || parent || top;
if ( win && win.tinymce && win.tinymce.isMac ) {
document.body.className = document.body.className.replace(/windows/, 'macos');
if ( navigator.userAgent.indexOf( 'Mac OS' ) > -1 ) {
document.body.className = document.body.className.replace( /windows/, 'macos' );
}
</script>