diff --git a/packages/main/src/CustomListItem.js b/packages/main/src/CustomListItem.js index 78beb3392ec2..7bb17ed97295 100644 --- a/packages/main/src/CustomListItem.js +++ b/packages/main/src/CustomListItem.js @@ -53,6 +53,22 @@ class CustomListItem extends ListItem { return [ListItem.styles, customListItemCss]; } + _onkeydown(event) { + if (!this.focused) { + return; + } + + super._onkeydown(event); + } + + _onkeyup(event) { + if (!this.focused) { + return; + } + + super._onkeyup(event); + } + get classes() { const result = super.classes; result.main["ui5-custom-li-root"] = true; diff --git a/packages/main/test/pages/List_test_page.html b/packages/main/test/pages/List_test_page.html index 1b2312f65fb3..752877682ae3 100644 --- a/packages/main/test/pages/List_test_page.html +++ b/packages/main/test/pages/List_test_page.html @@ -154,6 +154,26 @@