Ticket #21347: 21347.patch
| File 21347.patch, 4.1 KB (added by , 14 years ago) |
|---|
-
wp-admin/js/common.dev.js
321 321 322 322 // tab in textareas 323 323 $('#newcontent').bind('keydown.wpevent_InsertTab', function(e) { 324 if ( e.keyCode != 9 ) 325 return true; 324 var el = e.target, selStart, selEnd, val, scroll, sel;; 326 325 327 var el = e.target, selStart = el.selectionStart, selEnd = el.selectionEnd, val = el.value, scroll, sel; 326 if ( e.keyCode == 27 ) { // escape key 327 $(el).data('tab-out', true); 328 return; 329 } 328 330 331 if ( e.keyCode != 9 || e.ctrlKey || e.altKey || e.shiftKey ) // tab key 332 return; 333 334 if ( $(el).data('tab-out') ) { 335 $(el).data('tab-out', false); 336 return; 337 } 338 339 selStart = el.selectionStart; 340 selEnd = el.selectionEnd; 341 val = el.value; 342 329 343 try { 330 344 this.lastKey = 9; // not a standard DOM property, lastKey is to help stop Opera tab event. See blur handler below. 331 345 } catch(err) {} -
wp-admin/plugin-editor.php
226 226 </div> 227 227 <form name="template" id="template" action="plugin-editor.php" method="post"> 228 228 <?php wp_nonce_field('edit-plugin_' . $file) ?> 229 <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea> 229 <div><textarea cols="70" rows="25" name="newcontent" id="newcontent" aria-describedby="newcontent-description" tabindex="1"><?php echo $content ?></textarea> 230 <span id="newcontent-description" class="screen-reader-text"><?php _e('Content of the edited file. The Tab key enters a tab character, to move below this area, press the Esc key followed by the Tab key. Shift + Tab works as expected.'); ?></span> 230 231 <input type="hidden" name="action" value="update" /> 231 232 <input type="hidden" name="file" value="<?php echo esc_attr($file) ?>" /> 232 233 <input type="hidden" name="plugin" value="<?php echo esc_attr($plugin) ?>" /> … … 256 257 <br class="clear" /> 257 258 </div> 258 259 <script type="text/javascript"> 259 /* <![CDATA[ */260 260 jQuery(document).ready(function($){ 261 261 $('#template').submit(function(){ $('#scrollto').val( $('#newcontent').scrollTop() ); }); 262 262 $('#newcontent').scrollTop( $('#scrollto').val() ); 263 263 }); 264 /* ]]> */265 264 </script> 266 265 <?php 267 266 break; -
wp-admin/theme-editor.php
198 198 else : ?> 199 199 <form name="template" id="template" action="theme-editor.php" method="post"> 200 200 <?php wp_nonce_field( 'edit-theme_' . $file . $stylesheet ); ?> 201 <div><textarea cols="70" rows="30" name="newcontent" id="newcontent" tabindex="1"><?php echo $content ?></textarea> 202 <input type="hidden" name="action" value="update" /> 203 <input type="hidden" name="file" value="<?php echo esc_attr( $relative_file ); ?>" /> 204 <input type="hidden" name="theme" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" /> 205 <input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" /> 206 </div> 201 <div><textarea cols="70" rows="30" name="newcontent" id="newcontent" aria-describedby="newcontent-description" tabindex="1"><?php echo $content ?></textarea> 202 <span id="newcontent-description" class="screen-reader-text"><?php _e('Content of the edited file. The Tab key enters a tab character, to move below this area, press the Esc key followed by the Tab key. Shift + Tab works as expected.'); ?></span> 203 <input type="hidden" name="action" value="update" /> 204 <input type="hidden" name="file" value="<?php echo esc_attr( $relative_file ); ?>" /> 205 <input type="hidden" name="theme" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" /> 206 <input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" /> 207 </div> 207 208 <?php if ( ! empty( $functions ) ) : ?> 208 209 <div id="documentation" class="hide-if-no-js"> 209 210 <label for="docs-list"><?php _e('Documentation:') ?></label>