In the switch statement, within cases 9 and 13, this is the line where it causes the weird behavior:
theGrid.Instance.jqGrid(“editCell”, ++theGrid.CurrentRowEditing, –theGrid.CurrentColEditing, true);
If I set the last parameter to false, it doesn't screw up.