Ticket #11420: clear-fields-on-refresh.diff
| File clear-fields-on-refresh.diff, 1.2 KB (added by , 15 years ago) |
|---|
-
wp-includes/js/tinymce/plugins/wplink/js/wplink.dev.js
35 35 36 36 refresh : function() { 37 37 var e; 38 39 38 ed = tinyMCEPopup.editor; 40 39 40 // Clear previously selected links 41 rivers.elements.find('.selected').removeClass('selected'); 42 // Clear fields and focus the URL field 43 inputs.url.val('http://').focus(); 44 inputs.title.val(''); 45 41 46 // If link exists, select proper values. 42 47 if ( e = ed.dom.getParent(ed.selection.getNode(), 'A') ) { 43 48 // Set URL and description. … … 47 52 if ( "_blank" == ed.dom.getAttrib(e, 'target') ) 48 53 inputs.openInNewTab.attr('checked','checked'); 49 54 } 50 51 // Clear previously selected links 52 rivers.elements.find('.selected').removeClass('selected'); 53 // Focus the URL field 54 inputs.url.focus(); 55 55 56 // Load the most recent results if this is the first time opening the panel. 56 57 if ( ! rivers.recent.ul.children().length ) 57 58 rivers.recent.ajax();