Changeset 29333
- Timestamp:
- 07/31/2014 11:27:14 PM (11 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-editor.php
r29321 r29333 1377 1377 <div id="link-modal-title"> 1378 1378 <?php _e( 'Insert/edit link' ) ?> 1379 <button id="wp-link-close"><span class="screen-reader-text"><?php _e( 'Close' ); ?></span></button>1379 <button type="button" id="wp-link-close"><span class="screen-reader-text"><?php _e( 'Close' ); ?></span></button> 1380 1380 </div> 1381 1381 <div id="link-selector"> -
trunk/src/wp-includes/js/wplink.js
r29321 r29333 3 3 4 4 ( function( $ ) { 5 var inputs = {}, rivers = {}, editor, searchTimer, River, Query; 5 var editor, searchTimer, River, Query, 6 inputs = {}, 7 rivers = {}, 8 isTouch = ( 'ontouchend' in document ); 6 9 7 10 wpLink = { … … 54 57 55 58 // Display 'hint' message when search field or 'query-results' box are focused 56 inputs.search. add( rivers.elements ).on( 'focus.wplink', function() {59 inputs.search.on( 'focus.wplink', function() { 57 60 inputs.queryNoticeTextDefault.hide(); 58 61 inputs.queryNoticeTextHint.removeClass( 'screen-reader-text' ).show(); … … 121 124 rivers.recent.refresh(); 122 125 123 if ( wpLink.isMCE() ) 126 if ( wpLink.isMCE() ) { 124 127 wpLink.mceRefresh(); 125 else128 } else { 126 129 wpLink.setDefaultValues(); 127 128 // Focus the URL field and highlight its contents. 129 // If this is moved above the selection changes, 130 // IE will show a flashing cursor over the dialog. 131 inputs.url.focus()[0].select(); 130 } 131 132 if ( isTouch ) { 133 // Close the onscreen keyboard 134 inputs.url.focus().blur(); 135 } else { 136 // Focus the URL field and highlight its contents. 137 // If this is moved above the selection changes, 138 // IE will show a flashing cursor over the dialog. 139 inputs.url.focus()[0].select(); 140 } 141 132 142 // Load the most recent results if this is the first time opening the panel. 133 if ( ! rivers.recent.ul.children().length ) 143 if ( ! rivers.recent.ul.children().length ) { 134 144 rivers.recent.ajax(); 145 } 135 146 }, 136 147 … … 275 286 }, 276 287 277 updateFields: function( e, li , originalEvent) {288 updateFields: function( e, li ) { 278 289 inputs.url.val( li.children( '.item-permalink' ).val() ); 279 290 inputs.title.val( li.hasClass( 'no-title' ) ? '' : li.children( '.item-title' ).text() ); 280 if ( originalEvent && originalEvent.type == 'click' )281 inputs.url.focus();282 291 }, 283 292 … … 365 374 } 366 375 367 if ( inputs.url.is( ':focus' ) || inputs.title.is( ':focus' ) ) { 376 if ( document.activeElement && 377 ( document.activeElement.id === 'link-title-field' || document.activeElement.id === 'url-field' ) ) { 368 378 return; 369 379 }
Note: See TracChangeset
for help on using the changeset viewer.