Skip to content

Commit 3cfd4be

Browse files
committed
Support shadow DOM
1 parent fc93ab4 commit 3cfd4be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

addon/components/bs-form/element.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export default class BsFormElement extends BaseBsFormElement {
1414
}
1515

1616
get controlElement() {
17-
return document.getElementById(this.formElementId);
17+
// Start element search from this._element instead of `document`, to support being inside shadow DOM
18+
return this._element.querySelector(`#${this.formElementId}`);
1819
}
1920

2021
get errors() {

0 commit comments

Comments
 (0)