Skip to content

Commit dc2a561

Browse files
committed
refactor: 更新 selector 值
1 parent 1f6ae65 commit dc2a561

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/BootstrapBlazor/Components/Input/OtpInput.razor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ export function init(id) {
5151
}
5252

5353
const setPrevFocus = (el, target) => {
54-
const inputs = [...el.querySelectorAll('input')];
54+
const inputs = [...el.querySelectorAll('.bb-opt-item')];
5555
let index = inputs.indexOf(target);
5656
if (index > 0) {
5757
setFocus(inputs[index - 1]);
5858
}
5959
}
6060

6161
const setNextFocus = (el, target) => {
62-
const inputs = [...el.querySelectorAll('input')];
62+
const inputs = [...el.querySelectorAll('.bb-opt-item')];
6363
let index = inputs.indexOf(target);
6464
if (index < inputs.length - 1) {
6565
setFocus(inputs[index + 1]);

0 commit comments

Comments
 (0)