Skip to content

Commit

Permalink
add comments for conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnC-80 committed Oct 28, 2024
1 parent e93e0cd commit ac5fd7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/RepeatableField/RepeatableField.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ const RepeatableField = ({
// unwantedly moved when a form is initialized.
if (hasBeenFocused) {
if (addedNode &&
addedNode.nodeType === 1 &&
addedNode.matches(`.${css.repeatableFieldItem}`)) {
addedNode.nodeType === 1 && // looking for nodeType: element only... not attribute (2) or text (3)
addedNode.matches(`.${css.repeatableFieldItem}`)) { // only apply to repeatable field item addition removal
rowElem = getFirstFocusable(addedNode);
rowElem?.focus();
}
Expand Down

0 comments on commit ac5fd7f

Please sign in to comment.