Make WordPress Core

Changeset 25528


Ignore:
Timestamp:
09/20/2013 08:37:26 PM (13 years ago)
Author:
helen
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/wplink.js

    r25031 r25528  
    284284                        inputs.url.val('http://');
    285285                        inputs.title.val('');
    286 
    287                         if ( $('#search-panel').is(':visible') ) {
    288                                 var selectedText,
    289                                         textarea = wpLink.textarea;
    290 
    291                                 if ( wpLink.isMCE() ) {
    292                                         selectedText = tinyMCEPopup.editor.selection.getContent( { format: 'text' } );
    293                                 } else {
    294                                         if ( document.selection && wpLink.range ) {
    295                                                 selectedText = wpLink.range.text;
    296                                         } else if ( 'undefined' !== typeof textarea.selectionStart ) {
    297                                                 selectedText = textarea.value.substring( textarea.selectionStart, textarea.selectionEnd );
    298                                         }
    299                                 }
    300 
    301                                 if ( selectedText && ( selectedText = selectedText.replace( /^\s+|\s+$/g, '' ) ) ) {
    302                                         inputs.search.val( selectedText ).trigger('keyup');
    303                                 }
    304                         }
    305286
    306287                        // Update save prompt.
Note: See TracChangeset for help on using the changeset viewer.