Merge pull request #6480 from lehuuphuc/fix/datepicker-wrong-element-focused
Fix: focus on wrong element when adding "Select" component to footer slot of DatePickerpull/6483/head
commit
8a2c710a82
|
@ -2549,7 +2549,10 @@ export default {
|
||||||
let spanIndex = null;
|
let spanIndex = null;
|
||||||
|
|
||||||
for (let i = 0; i < focusableElements.length; i++) {
|
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();
|
focusableElements[spanIndex].focus();
|
||||||
|
|
Loading…
Reference in New Issue