Ticket #31415: 31415.patch
File 31415.patch, 1.0 KB (added by , 10 years ago) |
---|
-
src/wp-admin/js/common.js
465 465 var el = e.target, selStart, selEnd, val, scroll, sel; 466 466 467 467 if ( e.keyCode == 27 ) { // escape key 468 // when pressing Escape: Opera 12 and 27 blur form fields, IE 8 clears them 469 e.preventDefault(); 468 470 $(el).data('tab-out', true); 469 471 return; 470 472 } … … 481 483 selEnd = el.selectionEnd; 482 484 val = el.value; 483 485 484 try {485 this.lastKey = 9; // not a standard DOM property, lastKey is to help stop Opera tab event. See blur handler below.486 } catch(err) {}487 488 486 if ( document.selection ) { 489 487 el.focus(); 490 488 sel = document.selection.createRange(); … … 502 500 e.preventDefault(); 503 501 }); 504 502 505 $('#newcontent').bind('blur.wpevent_InsertTab', function() {506 if ( this.lastKey && 9 == this.lastKey )507 this.focus();508 });509 510 503 if ( pageInput.length ) { 511 504 pageInput.closest('form').submit( function() { 512 505