Changeset 32242
- Timestamp:
- 04/21/2015 01:58:09 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/wplink.js
r31996 r32242 143 143 144 144 refresh: function() { 145 var text = ''; 146 145 147 // Refresh rivers (clear links, check visibility) 146 148 rivers.search.refresh(); … … 150 152 wpLink.mceRefresh(); 151 153 } else { 152 inputs.wrap.removeClass( 'has-text-field' ); 153 inputs.text.val( '' ); 154 // For the Text editor the "Link text" field is always shown 155 if ( ! inputs.wrap.hasClass( 'has-text-field' ) ) { 156 inputs.wrap.addClass( 'has-text-field' ); 157 } 158 159 if ( document.selection ) { 160 // Old IE 161 text = document.selection.createRange().text || ''; 162 } else if ( typeof this.textarea.selectionStart !== 'undefined' && 163 ( this.textarea.selectionStart !== this.textarea.selectionEnd ) ) { 164 // W3C 165 text = this.textarea.value.substring( this.textarea.selectionStart, this.textarea.selectionEnd ) || ''; 166 } 167 168 inputs.text.val( text ); 154 169 wpLink.setDefaultValues(); 155 170 }
Note: See TracChangeset
for help on using the changeset viewer.