Skip to content

Commit

Permalink
fix(QRating): fix kbd navigation #15235 (#15237)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdanpdan committed Jan 8, 2023
1 parent 2216a32 commit aecb707
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/components/rating/QRating.js
Expand Up @@ -216,13 +216,13 @@ export default createComponent({
case 37: // LEFT ARROW
case 40: // DOWN ARROW
if (iconRefs[ `rt${ i - 1 }` ]) {
iconRefs[ `rt${ i - 1 }` ].$el.focus()
iconRefs[ `rt${ i - 1 }` ].focus()
}
return stopAndPrevent(e)
case 39: // RIGHT ARROW
case 38: // UP ARROW
if (iconRefs[ `rt${ i + 1 }` ]) {
iconRefs[ `rt${ i + 1 }` ].$el.focus()
iconRefs[ `rt${ i + 1 }` ].focus()
}
return stopAndPrevent(e)
}
Expand All @@ -245,7 +245,7 @@ export default createComponent({
child.push(
h('div', {
key: i,
ref: vm => { iconRefs[ `rt${ i }` ] = vm },
ref: el => { iconRefs[ `rt${ i }` ] = el },
class: 'q-rating__icon-container flex flex-center',
...attrs,
onClick () { set(i) },
Expand Down

0 comments on commit aecb707

Please sign in to comment.