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.
1 parent 3ca8cad commit f6265b6Copy full SHA for f6265b6
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 root = this.getRootNode()
+ const root = 'getRootNode' in this ? this.getRootNode() : document
302
let field
303
if (root instanceof Document || root instanceof ShadowRoot) {
304
field = root.getElementById(id)
0 commit comments