Skip to content

Commit

Permalink
Disabled elements should not be focused
Browse files Browse the repository at this point in the history
  • Loading branch information
BartChris committed May 10, 2024
1 parent 9e93112 commit ca62304
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ metadataEditor.metadataTree = {
event.preventDefault();
let form = element.form;
let focusableElements = Array.from(form.elements).filter((element) => {
return element.tabIndex >= 0;
return element.tabIndex >= 0 && !element.disabled;
});
let index = focusableElements.indexOf(element);
let nextInput = focusableElements[index + 1];
Expand Down

0 comments on commit ca62304

Please sign in to comment.