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':
return new TextSourceElement(element);
case 'INPUT':
imposterSourceElement = element;
[imposter, imposterContainer] = this._createImposter(element, false);
if (element.type === 'text') {
imposterSourceElement = element;
[imposter, imposterContainer] = this._createImposter(element, false);
}
break;
case 'TEXTAREA':
imposterSourceElement = element;