1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

limit input types on autofill query

This commit is contained in:
Kyle Spearrin
2017-10-03 16:11:11 -04:00
parent c6e5bd3b5f
commit 79deb5633a

View File

@@ -34,7 +34,7 @@
1. Populate isFirefox 1. Populate isFirefox
2. Remove isChrome and isSafari since they are not used. 2. Remove isChrome and isSafari since they are not used.
3. Unminify and format to meet Mozilla review requirements. 3. Unminify and format to meet Mozilla review requirements.
4. Remove button from getFormElements query selector 4. Remove button and limit input types from getFormElements query selector
*/ */
function collect(document, undefined) { function collect(document, undefined) {
@@ -551,7 +551,8 @@
function getFormElements(theDoc) { function getFormElements(theDoc) {
var els = []; var els = [];
try { try {
els = theDoc.querySelectorAll('input, select'); els = theDoc.querySelectorAll('input:not([type="hidden"]):not([type="submit"]):not([type="reset"])' +
':not([type="button"]):not([type="image"]):not([type="file"]), select');
} catch (e) { } } catch (e) { }
return els; return els;
} }