mirror of
https://github.com/shoelace-style/shoelace.git
synced 2026-01-12 02:59:13 +00:00
Co-authored-by: cyantree <cyantree@users.noreply.github.com>
This commit is contained in:
@@ -72,9 +72,8 @@ export class FormControlController implements ReactiveController {
|
||||
const formId = input.form;
|
||||
|
||||
if (formId) {
|
||||
const root = input.getRootNode() as Document | ShadowRoot;
|
||||
|
||||
const form = root.getElementById(formId);
|
||||
const root = input.getRootNode() as Document | ShadowRoot | HTMLElement;
|
||||
const form = root.querySelector(`#${formId}`);
|
||||
|
||||
if (form) {
|
||||
return form as HTMLFormElement;
|
||||
|
||||
Reference in New Issue
Block a user