We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c2c481b + 79fd194 commit 580bde4Copy full SHA for 580bde4
src/index.ts
@@ -298,7 +298,7 @@ class MarkdownToolbarElement extends HTMLElement {
298
get field(): HTMLTextAreaElement | null {
299
const id = this.getAttribute('for')
300
if (!id) return null
301
- const field = document.getElementById(id)
+ const field = (this.getRootNode() as Document | ShadowRoot).getElementById(id)
302
return field instanceof HTMLTextAreaElement ? field : null
303
}
304
0 commit comments