From: Jason Etheridge Date: Wed, 28 Mar 2012 19:19:42 +0000 (-0400) Subject: fix a Down action bug in Configure Toolbars X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=251717941bae2a4606d968065d7aa241349bb0b5;p=evergreen%2Fpines.git fix a Down action bug in Configure Toolbars where the list selection index could be set to an invalid value, which could cause errors for actions acting upon that index Signed-off-by: Jason Etheridge Signed-off-by: Thomas Berezansky --- diff --git a/Open-ILS/xul/staff_client/server/admin/toolbar.js b/Open-ILS/xul/staff_client/server/admin/toolbar.js index 8e899be046..8a0e17afbc 100644 --- a/Open-ILS/xul/staff_client/server/admin/toolbar.js +++ b/Open-ILS/xul/staff_client/server/admin/toolbar.js @@ -303,6 +303,7 @@ function populate_list2_list3(list3_idx) { if (list3_idx) { if (list3_idx < 0) { list3_idx = 0; } + if (list3_idx >= g.list3.node.view.rowCount) { list3_idx = g.list3.node.view.rowCount - 1; } g.list3.node.view.selection.select(list3_idx); }