don't attach to hidden forms

This commit is contained in:
Evert Prants 2022-08-28 18:18:40 +03:00
parent 8f380ed30b
commit 003d5dcee5
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -128,6 +128,13 @@
} }
function attachLoginFormHighlight(info) { function attachLoginFormHighlight(info) {
if (
info.form.offsetParent === null ||
window.getComputedStyle(info.form).display === 'none'
) {
return;
}
successfulAttachment = true; successfulAttachment = true;
const autoFillContainer = document.createElement('div'); const autoFillContainer = document.createElement('div');
Object.assign(autoFillContainer.style, { Object.assign(autoFillContainer.style, {
@ -174,7 +181,7 @@
background: 'transparent', background: 'transparent',
fontWeight: 'bold', fontWeight: 'bold',
fontSize: '12px', fontSize: '12px',
pointerEvents: 'all' pointerEvents: 'all',
}); });
autoFillContainer.appendChild(close); autoFillContainer.appendChild(close);