diff --git a/ext/js/dom/text-source-range.js b/ext/js/dom/text-source-range.js index 4bcb59700..42032786d 100644 --- a/ext/js/dom/text-source-range.js +++ b/ext/js/dom/text-source-range.js @@ -101,7 +101,8 @@ export class TextSourceRange { */ isImposterInputOrTextArea() { if (this._imposterSourceElement) { - return this._imposterSourceElement.tagName === 'INPUT' || this._imposterSourceElement.tagName === 'TEXTAREA'; + const type = this._imposterSourceElement.nodeName.toUpperCase(); + return type === 'INPUT' || type === 'TEXTAREA'; } return false; }