From 4d11ce7b5fa0228dec661199a493030b1af533a5 Mon Sep 17 00:00:00 2001 From: varjolintu Date: Fri, 8 Sep 2017 09:04:27 +0300 Subject: [PATCH] Automatic detection of divs with forms that are non-hidden by user interaction --- CHANGELOG | 2 +- keepassxc-browser/keepassxc-browser.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 009001f..95cde52 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,7 +4,7 @@ - Merged changes from the latest passifox (credits to smorks) - HTTP auth works with all browsers - Fixed showing credentials from previous logins in the popup (credits to smorks) -- TODO: Automatic detectal of div's with forms that are non-hidden by user interaction +- Automatic detection of div's with forms that are non-hidden by user interaction 0.2.9 (2017-08-27) ========================= diff --git a/keepassxc-browser/keepassxc-browser.js b/keepassxc-browser/keepassxc-browser.js index 3123813..807f07e 100644 --- a/keepassxc-browser/keepassxc-browser.js +++ b/keepassxc-browser/keepassxc-browser.js @@ -1696,4 +1696,15 @@ cipEvents.triggerActivatedTab = function() { args: [ cip.url, cip.submitUrl ] }).then(cip.retrieveCredentialsCallback); } -} \ No newline at end of file +} + +// Detect div's that include forms and are visible +$(function() { + const divDetect = setInterval(function() { + const fields = cipFields.getAllFields(); + if (fields.length > 0) { + cip.initCredentialFields(true); + clearInterval(divDetect); + } + }, 1000); +}); \ No newline at end of file