Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(QRating): fix kbd navigation #15235 #15237

Merged
merged 1 commit into from
Jan 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions ui/src/components/rating/QRating.js
Original file line number Diff line number Diff line change
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