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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user