Fix non-text <input> elements being included in scanning content (#2034)

This commit is contained in:
toasted-nutbread 2021-12-14 14:55:24 -05:00 committed by GitHub
parent 0356241362
commit ecbbfa39a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,8 +39,10 @@ class DocumentUtil {
case 'SELECT': case 'SELECT':
return new TextSourceElement(element); return new TextSourceElement(element);
case 'INPUT': case 'INPUT':
imposterSourceElement = element; if (element.type === 'text') {
[imposter, imposterContainer] = this._createImposter(element, false); imposterSourceElement = element;
[imposter, imposterContainer] = this._createImposter(element, false);
}
break; break;
case 'TEXTAREA': case 'TEXTAREA':
imposterSourceElement = element; imposterSourceElement = element;