TinyMCE, inline link dialog:

- Reset the inline dialog when canceling the advanced modal. If there is a link it should be on the first stage: follow/preview link.
- Fix tabbing in the inline edit dialog.

See #33301.
Built from https://develop.svn.wordpress.org/trunk@36703


git-svn-id: http://core.svn.wordpress.org/trunk@36670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2016-02-25 03:48:26 +00:00
parent ac0e119cad
commit 611acc2193
6 changed files with 16 additions and 16 deletions

View File

@ -57,7 +57,7 @@
return (
'<div id="' + this._id + '" class="wp-link-input">' +
'<input type="text" value="" tabindex="-1" placeholder="' + tinymce.translate('Paste URL or type to search') + '" />' +
'<input type="hidden" value="" />' +
'<input type="text" style="display:none" value="" />' +
'</div>'
);
},
@ -445,5 +445,11 @@
cmd: 'wp_link_apply',
classes: 'widget btn primary'
} );
return {
hideEditToolbar: function() {
editToolbar.hide();
}
};
} );
} )( window.tinymce );

File diff suppressed because one or more lines are too long

View File

@ -208,7 +208,9 @@ var wpLink;
// Focus the URL field and highlight its contents.
// If this is moved above the selection changes,
// IE will show a flashing cursor over the dialog.
inputs.url.focus()[0].select();
window.setTimeout( function() {
inputs.url.focus()[0].select();
}, 100 );
}
correctedURL = inputs.url.val().replace( /^http:\/\//, '' );
@ -242,8 +244,7 @@ var wpLink;
},
mceRefresh: function( url, text ) {
var selectedNode = editor.selection.getNode(),
linkNode = editor.dom.getParent( selectedNode, 'a[href]' ),
var linkNode = editor.dom.getParent( editor.selection.getNode(), 'a[href]' ),
onlyText = this.hasSelectedText( linkNode );
if ( linkNode ) {
@ -272,8 +273,6 @@ var wpLink;
},
close: function() {
var linkNode;
$( document.body ).removeClass( 'modal-open' );
if ( ! wpLink.isMCE() ) {
@ -284,12 +283,7 @@ var wpLink;
wpLink.range.select();
}
} else {
linkNode = editor.dom.getParent( editor.selection.getNode(), 'a[href]' );
if ( linkNode && editor.dom.getAttrib( linkNode, 'href' ) === '_wp_link_placeholder' ) {
editor.dom.remove( linkNode, true );
}
editor.plugins.wplink.hideEditToolbar();
editor.focus();
}

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.5-beta1-36702';
$wp_version = '4.5-beta1-36703';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
@ -18,7 +18,7 @@ $wp_db_version = 36686;
*
* @global string $tinymce_version
*/
$tinymce_version = '4304-20160219';
$tinymce_version = '4304-20160224';
/**
* Holds the required PHP version