Make input field type detection case insensitive

This commit is contained in:
varjolintu 2018-10-15 08:07:56 +03:00 committed by Janek Bevendorff
parent 2c88d1716e
commit bd8afc24b3

View file

@ -1260,7 +1260,12 @@ cipObserverHelper.getInputs = function(target) {
// Only include input fields that match with cipObserverHelper.inputTypes
let inputs = [];
for (const i of inputFields) {
if (cipObserverHelper.inputTypes.includes(i.getAttribute('type'))) {
let type = i.getAttribute('type');
if (type) {
type = type.toLowerCase();
}
if (cipObserverHelper.inputTypes.includes(type)) {
inputs.push(i);
}
}