This is an automated email from the ASF dual-hosted git repository.

hiedra pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit f259608731da40a2620910c7ad50f54dc07709bf
Author: mjesteve <mjest...@iest.com>
AuthorDate: Mon Aug 29 23:37:30 2022 +0200

    Fixed. Navigating with the keyboard from the first visible itemRenderer 
upwards or from the last visible itemRenderer downwards caused an error because 
the item is not yet created.
---
 .../main/royale/org/apache/royale/jewel/beads/views/VirtualListView.as | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/VirtualListView.as
 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/VirtualListView.as
index c6aa59996d..8ea5a90d39 100644
--- 
a/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/VirtualListView.as
+++ 
b/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/views/VirtualListView.as
@@ -99,7 +99,8 @@ package org.apache.royale.jewel.beads.views
                                        selectionBead.selected = false;
                        }
                        ir = 
dataGroup.getItemRendererForIndex(listModel.selectedIndex + (next ? 1 : -1)) as 
IItemRenderer;
-            ir.dispatchEvent(new Event("click"));
+                       if (ir) 
+               ir.dispatchEvent(new Event("click"));
         }
         
                protected var listModel:ISelectionModel;

Reply via email to