Make WordPress Core

Ticket #31415: 31415.patch

File 31415.patch, 1.0 KB (added by afercia, 10 years ago)
  • src/wp-admin/js/common.js

     
    465465                var el = e.target, selStart, selEnd, val, scroll, sel;
    466466
    467467                if ( e.keyCode == 27 ) { // escape key
     468                        // when pressing Escape: Opera 12 and 27 blur form fields, IE 8 clears them
     469                        e.preventDefault();
    468470                        $(el).data('tab-out', true);
    469471                        return;
    470472                }
     
    481483                selEnd = el.selectionEnd;
    482484                val = el.value;
    483485
    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 
    488486                if ( document.selection ) {
    489487                        el.focus();
    490488                        sel = document.selection.createRange();
     
    502500                        e.preventDefault();
    503501        });
    504502
    505         $('#newcontent').bind('blur.wpevent_InsertTab', function() {
    506                 if ( this.lastKey && 9 == this.lastKey )
    507                         this.focus();
    508         });
    509 
    510503        if ( pageInput.length ) {
    511504                pageInput.closest('form').submit( function() {
    512505