Skip to content

Commit

Permalink
Fix an error with ElementSelect JS for selectable = false
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design authored Apr 26, 2024
1 parent f2529ea commit 7f4a6e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/assets/cp/src/js/BaseElementSelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ Craft.BaseElementSelectInput = Garnish.Base.extend(
const lastElementIndex = this.$elements.index($elements.last());
$nextElement = this.$elements.eq(lastElementIndex + 1);
}
if ($nextElement.length) {
if ($nextElement && $nextElement.length) {
$nextElement.focus();
} else {
this.focusNextLogicalElement();
Expand Down

0 comments on commit 7f4a6e1

Please sign in to comment.