Skip to content

Commit

Permalink
fix(ui5-tokenizer): improve code
Browse files Browse the repository at this point in the history
  • Loading branch information
ivoplashkov committed May 20, 2024
1 parent 28bfd15 commit 22e9ceb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/main/src/Tokenizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,13 +541,11 @@ class Tokenizer extends UI5Element {
const currentListItem = e.detail.item as ListItem;
const nextListItem = currentListItem.nextElementSibling as ListItem;
const previousListItem = currentListItem.previousElementSibling as ListItem;
const focusItem = nextListItem || previousListItem;

if (nextListItem) {
if (focusItem) {
await renderFinished();
nextListItem.focus();
} else if (previousListItem) {
await renderFinished();
previousListItem.focus();
focusItem.focus();
}
}
}
Expand Down

0 comments on commit 22e9ceb

Please sign in to comment.