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.

Built from https://develop.svn.wordpress.org/trunk@25528


git-svn-id: http://core.svn.wordpress.org/trunk@25448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Helen Hou-Sandí 2013-09-20 20:38:09 +00:00
parent d729fbf8e6
commit 09954eb82e
2 changed files with 1 additions and 20 deletions

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 );
},

File diff suppressed because one or more lines are too long