From 5e5480b03ed5be65e3d17d709d2bcf1350ff8f15 Mon Sep 17 00:00:00 2001 From: Helen Hou-Sandi Date: Fri, 20 Sep 2013 20:37:26 +0000 Subject: [PATCH] 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 --- src/wp-includes/js/wplink.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/wp-includes/js/wplink.js b/src/wp-includes/js/wplink.js index f36077129b..232fd4e2f9 100644 --- a/src/wp-includes/js/wplink.js +++ b/src/wp-includes/js/wplink.js @@ -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 ); },