Skip to content

Commit 018621e

Browse files
fix querySelector in Form focusOnError when id includes dots (#4280)
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
1 parent 514ea85 commit 018621e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/components/Form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,7 @@ export default class Form<
837837
let field = this.formElement.current.elements[elementId];
838838
if (!field) {
839839
// if not an exact match, try finding an input starting with the element id (like radio buttons or checkboxes)
840-
field = this.formElement.current.querySelector(`input[id^=${elementId}`);
840+
field = this.formElement.current.querySelector(`input[id^="${elementId}"`);
841841
}
842842
if (field && field.length) {
843843
// If we got a list with length > 0

0 commit comments

Comments
 (0)