Merge pull request #6480 from lehuuphuc/fix/datepicker-wrong-element-focused

Fix: focus on wrong element when adding "Select" component to footer slot of DatePicker
pull/6483/head
Tuğçe Küçükoğlu 2024-09-26 16:31:24 +03:00 committed by GitHub
commit 8a2c710a82
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -2549,7 +2549,10 @@ export default {
let spanIndex = null;
for (let i = 0; i < focusableElements.length; i++) {
if (focusableElements[i].tagName === 'SPAN') spanIndex = i;
if (focusableElements[i].tagName === 'SPAN') {
spanIndex = i;
break;
}
}
focusableElements[spanIndex].focus();