If a new login div is created it is not detected at hidden first.. let the loop be

This commit is contained in:
varjolintu 2017-09-17 10:50:45 +03:00
parent 61d2090496
commit 6c434e372b

View file

@ -810,7 +810,6 @@ cipFields.getAllFields = function() {
cipFields.getHiddenFieldCount = function() {
let count = 0;
jQuery(cipFields.inputQueryPattern).each(function() {
if (jQuery(this).is(':hidden')) {
count++;
@ -1122,17 +1121,18 @@ cip.init = function() {
};
cip.detectNewActiveFields = function() {
const hiddenFields = cipFields.getHiddenFieldCount();
//const hiddenFields = cipFields.getHiddenFieldCount();
if (hiddenFields > 0) {
//if (hiddenFields > 0) {
const divDetect = setInterval(function() {
const fields = cipFields.getAllFields();
if (fields.length > 0) {
console.log(fields.length);
if (fields.length > 1) {
cip.initCredentialFields(true);
clearInterval(divDetect);
}
}, 1000);
}
//}
};
cip.initCredentialFields = function(forceCall) {