Fix selecting next entry when there are no others

This commit is contained in:
Nathan Gray 2014-03-06 18:07:47 +00:00
parent d67a0280a7
commit dbbad57f90
2 changed files with 2 additions and 2 deletions

View File

@ -345,7 +345,7 @@ var et2_dataview_selectionManager = Class.extend(
var count = Math.max(1,Math.min(self._total,50));
var element = null;
var idx = _entry.idx;
while(element == null && count > 0)
while(element == null && count > 0 && max_index > 0)
{
count--;
element = getIndexAO(Math.max(0,

View File

@ -489,7 +489,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput],
var uid = (this.controller.dataStorePrefix || app) + "::" + _row_ids[0];
var entry = this.controller._selectionMgr._getRegisteredRowsEntry(uid);
var next = (entry.ao?entry.ao.getNext(_row_ids.length):null);
if(next == null || !next.id)
if(next == null || !next.id || next.id == uid)
{
// No next, select previous
next = (entry.ao?entry.ao.getPrevious(1):null);