Revert [25031] and [24841] - filling the internal linking search field with selected text has UX and performance issues with no resolution in sight. see #16276.

git-svn-id: https://develop.svn.wordpress.org/trunk@25528 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2013-09-20 20:37:26 +00:00
parent afe1b7a6c9
commit 5e5480b03e

View File

@ -284,25 +284,6 @@ var wpLink;
inputs.url.val('http://');
inputs.title.val('');
if ( $('#search-panel').is(':visible') ) {
var selectedText,
textarea = wpLink.textarea;
if ( wpLink.isMCE() ) {
selectedText = tinyMCEPopup.editor.selection.getContent( { format: 'text' } );
} else {
if ( document.selection && wpLink.range ) {
selectedText = wpLink.range.text;
} else if ( 'undefined' !== typeof textarea.selectionStart ) {
selectedText = textarea.value.substring( textarea.selectionStart, textarea.selectionEnd );
}
}
if ( selectedText && ( selectedText = selectedText.replace( /^\s+|\s+$/g, '' ) ) ) {
inputs.search.val( selectedText ).trigger('keyup');
}
}
// Update save prompt.
inputs.submit.val( wpLinkL10n.save );
},