Editor: do not use the `modal-open` class to determine when the wpLink modal is open. This is a class used in Bootstrap and may be present when wpLink is not open. Store the open/closed state instead.
Fixes #36662. Built from https://develop.svn.wordpress.org/trunk@37630 git-svn-id: http://core.svn.wordpress.org/trunk@37598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2211c28a37
commit
5e5aa1a69a
|
@ -158,7 +158,7 @@
|
||||||
editToolbar = editor.wp._createToolbar( editButtons, true );
|
editToolbar = editor.wp._createToolbar( editButtons, true );
|
||||||
|
|
||||||
editToolbar.on( 'show', function() {
|
editToolbar.on( 'show', function() {
|
||||||
if ( ! tinymce.$( document.body ).hasClass( 'modal-open' ) ) {
|
if ( typeof window.wpLink === 'undefiend' || ! window.wpLink.modalOpen ) {
|
||||||
window.setTimeout( function() {
|
window.setTimeout( function() {
|
||||||
var element = editToolbar.$el.find( 'input.ui-autocomplete-input' )[0],
|
var element = editToolbar.$el.find( 'input.ui-autocomplete-input' )[0],
|
||||||
selection = linkNode && ( linkNode.textContent || linkNode.innerText );
|
selection = linkNode && ( linkNode.textContent || linkNode.innerText );
|
||||||
|
@ -475,7 +475,7 @@
|
||||||
var linkNode = editor.dom.getParent( event.element, 'a' ),
|
var linkNode = editor.dom.getParent( event.element, 'a' ),
|
||||||
$linkNode, href, edit;
|
$linkNode, href, edit;
|
||||||
|
|
||||||
if ( tinymce.$( document.body ).hasClass( 'modal-open' ) ) {
|
if ( typeof window.wpLink !== 'undefiend' && window.wpLink.modalOpen ) {
|
||||||
editToolbar.tempHide = true;
|
editToolbar.tempHide = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -19,6 +19,7 @@ var wpLink;
|
||||||
keySensitivity: 100,
|
keySensitivity: 100,
|
||||||
lastSearch: '',
|
lastSearch: '',
|
||||||
textarea: '',
|
textarea: '',
|
||||||
|
modalOpen: false,
|
||||||
|
|
||||||
init: function() {
|
init: function() {
|
||||||
inputs.wrap = $('#wp-link-wrap');
|
inputs.wrap = $('#wp-link-wrap');
|
||||||
|
@ -97,6 +98,7 @@ var wpLink;
|
||||||
$body = $( document.body );
|
$body = $( document.body );
|
||||||
|
|
||||||
$body.addClass( 'modal-open' );
|
$body.addClass( 'modal-open' );
|
||||||
|
wpLink.modalOpen = true;
|
||||||
linkNode = node;
|
linkNode = node;
|
||||||
|
|
||||||
wpLink.range = null;
|
wpLink.range = null;
|
||||||
|
@ -274,6 +276,7 @@ var wpLink;
|
||||||
|
|
||||||
close: function( reset ) {
|
close: function( reset ) {
|
||||||
$( document.body ).removeClass( 'modal-open' );
|
$( document.body ).removeClass( 'modal-open' );
|
||||||
|
wpLink.modalOpen = false;
|
||||||
|
|
||||||
if ( reset !== 'noReset' ) {
|
if ( reset !== 'noReset' ) {
|
||||||
if ( ! wpLink.isMCE() ) {
|
if ( ! wpLink.isMCE() ) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.6-alpha-37629';
|
$wp_version = '4.6-alpha-37630';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue