From 7aa7230082d84e8a072133d8684358dad47eb729 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Fri, 17 Nov 2023 15:48:28 +0300 Subject: [PATCH] Fixed #4839 - OrderList / PickList: defect on first tab focus --- components/lib/orderlist/OrderList.vue | 2 +- components/lib/picklist/PickList.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/lib/orderlist/OrderList.vue b/components/lib/orderlist/OrderList.vue index 74804a56b..990a35bf7 100755 --- a/components/lib/orderlist/OrderList.vue +++ b/components/lib/orderlist/OrderList.vue @@ -139,7 +139,7 @@ export default { return ObjectUtils.findIndexInList(item, this.d_selection) != -1; }, onListFocus(event) { - const selectedFirstItem = DomHandler.findSingle(this.list, '[data-p-highlight="true"]'); + const selectedFirstItem = DomHandler.findSingle(this.list, '[data-p-highlight="true"]') || DomHandler.findSingle(this.list, '[data-pc-section="item"]'); if (selectedFirstItem) { const findIndex = ObjectUtils.findIndexInList(selectedFirstItem, this.list.children); diff --git a/components/lib/picklist/PickList.vue b/components/lib/picklist/PickList.vue index cf947d01e..31bdc5941 100755 --- a/components/lib/picklist/PickList.vue +++ b/components/lib/picklist/PickList.vue @@ -264,7 +264,7 @@ export default { return ObjectUtils.findIndexInList(item, this.d_selection[listIndex]) != -1; }, onListFocus(event, listType) { - const selectedFirstItem = DomHandler.findSingle(this.$refs[listType].$el, '[data-p-highlight="true"]'); + const selectedFirstItem = DomHandler.findSingle(this.$refs[listType].$el, '[data-p-highlight="true"]') || DomHandler.findSingle(this.$refs[listType].$el, '[data-pc-section="item"]'); if (selectedFirstItem) { const findIndex = ObjectUtils.findIndexInList(selectedFirstItem, this.$refs[listType].$el.children);