rem: handle.keydown(function(event) {  if (event.keyCode != 9 && !self.rowObject) { self.rowObject = new self.row(item, 'keyboard', self.indentEnabled, self.maxDepth, true); }  var keyChange = false; switch (event.keyCode) { case 37: case 63234: keyChange = true; self.rowObject.indent(-1); break; case 38: case 63232: var previousRow = $(self.rowObject.element).prev('tr').get(0); while (previousRow && $(previousRow).is(':hidden')) { previousRow = $(previousRow).prev('tr').get(0); } if (previousRow) { self.safeBlur = false; self.rowObject.direction = 'up'; keyChange = true; if (self.rowObject.isValidSwap(previousRow, 0)) { self.rowObject.swap('before', previousRow); window.scrollBy(0, -parseInt(item.offsetHeight)); } else if (self.table.tBodies[0].rows[0] != previousRow || $(previousRow).is('.draggable')) { self.rowObject.swap('before', previousRow); self.rowObject.indent(-1); window.scrollBy(0, -parseInt(item.offsetHeight)); } handle.get(0).focus(); } break; case 39: case 63235: keyChange = true; self.rowObject.indent(1); break; case 40: case 63233: var nextRow = $(self.rowObject.group).filter(':last').next('tr').get(0); while (nextRow && $(nextRow).is(':hidden')) { nextRow = $(nextRow).next('tr').get(0); } if (nextRow) { self.safeBlur = false; self.rowObject.direction = 'down'; keyChange = true; if (self.rowObject.isValidSwap(nextRow, 0)) { self.rowObject.swap('after', nextRow); } else { self.rowObject.swap('after', nextRow); self.rowObject.indent(-1); } handle.get(0).focus(); window.scrollBy(0, parseInt(item.offsetHeight)); } break; }  if (self.rowObject && self.rowObject.changed == true) { $(item).addClass('drag'); if (self.oldRowElement) { $(self.oldRowElement).removeClass('drag-previous'); } self.oldRowElement = item; self.restripeTable(); self.onDrag(); }   if (keyChange) { return false; } 
add: handle.focus(function() { $(this).addClass('tabledrag-handle-hover'); self.safeBlur = true; 
context:   handle.keydown(function(event) {    // If a rowObject doesn't yet exist and this isn't the tab key.    if (event.keyCode != 9 && !self.rowObject) {      self.rowObject = new self.row(item, 'keyboard', self.indentEnabled, self.maxDepth, true);    }    var keyChange = false;    switch (event.keyCode) {      case 37: // Left arrow.      case 63234: // Safari left arrow.        keyChange = true;        self.rowObject.indent(-1);        break;      case 38: // Up arrow.      case 63232: // Safari up arrow.        var previousRow = $(self.rowObject.element).prev('tr').get(0);        while (previousRow && $(previousRow).is(':hidden')) {          previousRow = $(previousRow).prev('tr').get(0);        }        if (previousRow) {          self.safeBlur = false; // Do not allow the onBlur cleanup.          self.rowObject.direction = 'up';          keyChange = true;          if (self.rowObject.isValidSwap(previousRow, 0)) {            self.rowObject.swap('before', previousRow);            window.scrollBy(0, -parseInt(item.offsetHeight));          }          else if (self.table.tBodies[0].rows[0] != previousRow || $(previousRow).is('.draggable')) {            self.rowObject.swap('before', previousRow);            self.rowObject.indent(-1);            window.scrollBy(0, -parseInt(item.offsetHeight));          }          handle.get(0).focus(); // Regain focus after the DOM manipulation.        }        break;      case 39: // Right arrow.      case 63235: // Safari right arrow.        keyChange = true;        self.rowObject.indent(1);        break;      case 40: // Down arrow.      case 63233: // Safari down arrow.        var nextRow = $(self.rowObject.group).filter(':last').next('tr').get(0);        while (nextRow && $(nextRow).is(':hidden')) {          nextRow = $(nextRow).next('tr').get(0);        }        if (nextRow) {          self.safeBlur = false; // Do not allow the onBlur cleanup.          self.rowObject.direction = 'down';          keyChange = true;          if (self.rowObject.isValidSwap(nextRow, 0)) {            self.rowObject.swap('after', nextRow);          }          else {            self.rowObject.swap('after', nextRow);            self.rowObject.indent(-1);          }          handle.get(0).focus(); // Regain focus after the DOM manipulation.          window.scrollBy(0, parseInt(item.offsetHeight));        }        break;    }    if (self.rowObject && self.rowObject.changed == true) {      $(item).addClass('drag');      if (self.oldRowElement) {        $(self.oldRowElement).removeClass('drag-previous');      }      self.oldRowElement = item;      self.restripeTable();      self.onDrag();    }    // Returning false if we have an arrow key to prevent scrolling.    if (keyChange) {      return false;    }  });
meta: 6801	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6801/1f299b52e0571d01cd9b15ae53ec60ca099c18fa/tabledrag.js/clean/misc/tabledrag.js