Skip to content

Commit

Permalink
updated comment
Browse files Browse the repository at this point in the history
  • Loading branch information
BabyElias committed Aug 21, 2024
1 parent 109c7d3 commit b66421f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/KTable/KTableGridItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,12 @@
},
methods: {
onKeydown(event) {
// Check if the focused element is a button or actionable item
// Ensures that clickable elements within a table cell, such as buttons and links, can be clicked with ENTER key.
const focusedElement = event.target;
if (
event.key === 'Enter' &&
(focusedElement.tagName === 'BUTTON' ||
focusedElement.tagName === 'A' ||
focusedElement.hasAttribute('role'))
focusedElement.tagName === 'A')
) {
focusedElement.click();
} else {
Expand Down

0 comments on commit b66421f

Please sign in to comment.