mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #844 from keepassxreboot/fix/totp_maxlength_comparison
Fix TOTP field maxLength comparison & do not override TOTP icon
This commit is contained in:
commit
ca2d4fd7b1
2 changed files with 5 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ TOTPFieldIcon.prototype.initField = function(field) {
|
||||||
|| field.getAttribute('kpxc-totp-field') === 'true'
|
|| field.getAttribute('kpxc-totp-field') === 'true'
|
||||||
|| field.offsetWidth < MINIMUM_SIZE
|
|| field.offsetWidth < MINIMUM_SIZE
|
||||||
|| field.size < 2
|
|| field.size < 2
|
||||||
|| (field.maxLength > 0 && field.maxLength < 4)
|
|| (field.maxLength > 0 && (field.maxLength < 6 || field.maxLength > 8))
|
||||||
|| field.id.match(ignoreRegex)
|
|| field.id.match(ignoreRegex)
|
||||||
|| field.name.match(ignoreRegex)) {
|
|| field.name.match(ignoreRegex)) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,10 @@ class UsernameFieldIcon extends Icon {
|
||||||
}
|
}
|
||||||
|
|
||||||
UsernameFieldIcon.prototype.initField = function(field) {
|
UsernameFieldIcon.prototype.initField = function(field) {
|
||||||
if (!field || field.getAttribute('kpxc-username-field') === 'true' || !kpxcFields.isVisible(field)) {
|
if (!field
|
||||||
|
|| field.getAttribute('kpxc-username-field') === 'true'
|
||||||
|
|| field.getAttribute('kpxc-totp-field') === 'true'
|
||||||
|
|| !kpxcFields.isVisible(field)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue