From d688a2ddc204f10d4d7e7bcda016d595f12df4d8 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Fri, 26 Jun 2015 20:28:59 +0000 Subject: [PATCH] TinyMCE, inline link toolbar: fix z-index bug in iOS Safari. See #32604. git-svn-id: https://develop.svn.wordpress.org/trunk@32958 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/wplink.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/js/wplink.js b/src/wp-includes/js/wplink.js index de4948152a..4585ca02a2 100644 --- a/src/wp-includes/js/wplink.js +++ b/src/wp-includes/js/wplink.js @@ -94,9 +94,10 @@ var wpLink; }, open: function( editorId ) { - var ed; + var ed, + $body = $( document.body ); - $( document.body ).addClass( 'modal-open' ); + $body.addClass( 'modal-open' ); wpLink.range = null; @@ -111,6 +112,12 @@ var wpLink; this.textarea = $( '#' + window.wpActiveEditor ).get( 0 ); if ( typeof tinymce !== 'undefined' ) { + // Make sure the link wrapper is the last element in the body. + // Fixes z-index bug in iOS. + if ( tinymce.Env.iOS ) { + $body.append( inputs.backdrop, inputs.wrap ); + } + ed = tinymce.get( wpActiveEditor ); if ( ed && ! ed.isHidden() ) {