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

git-svn-id: https://develop.svn.wordpress.org/trunk@29449 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2014-08-08 21:17:15 +00:00
parent 78c928ad44
commit d6d00167a6
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>