mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #1388 from keepassxreboot/fix/filling_dynamic_popups
Fix filling dynamic popups
This commit is contained in:
commit
eeb69820bd
6 changed files with 23 additions and 3 deletions
|
|
@ -92,6 +92,9 @@ class Autocomplete {
|
||||||
item.addEventListener('mouseover', ev => this.mouseOver(ev, div, item));
|
item.addEventListener('mouseover', ev => this.mouseOver(ev, div, item));
|
||||||
item.addEventListener('mouseout', ev => this.mouseOut(ev, item));
|
item.addEventListener('mouseout', ev => this.mouseOut(ev, item));
|
||||||
|
|
||||||
|
item.addEventListener('mousedown', ev => ev.stopPropagation());
|
||||||
|
item.addEventListener('mouseup', ev => ev.stopPropagation());
|
||||||
|
|
||||||
div.appendChild(item);
|
div.appendChild(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,8 @@ CredentialAutocomplete.prototype.click = async function(e, input) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
if (input.value !== '') {
|
if (input.value !== '') {
|
||||||
input.select();
|
input.select();
|
||||||
}
|
}
|
||||||
|
|
@ -21,6 +23,8 @@ CredentialAutocomplete.prototype.itemClick = async function(e, item, input, uuid
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
const index = Array.prototype.indexOf.call(e.currentTarget.parentElement.childNodes, e.currentTarget);
|
const index = Array.prototype.indexOf.call(e.currentTarget.parentElement.childNodes, e.currentTarget);
|
||||||
const usernameValue = item.getElementsByTagName('input')[0].value;
|
const usernameValue = item.getElementsByTagName('input')[0].value;
|
||||||
await this.fillPassword(usernameValue, index, uuid);
|
await this.fillPassword(usernameValue, index, uuid);
|
||||||
|
|
|
||||||
|
|
@ -75,10 +75,13 @@ PasswordIcon.prototype.createIcon = function(field) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
e.preventDefault();
|
e.stopPropagation();
|
||||||
kpxcPasswordDialog.showDialog(field, icon);
|
kpxcPasswordDialog.showDialog(field, icon);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
icon.addEventListener('mousedown', ev => ev.stopPropagation());
|
||||||
|
icon.addEventListener('mouseup', ev => ev.stopPropagation());
|
||||||
|
|
||||||
kpxcUI.setIconPosition(icon, field, this.rtl);
|
kpxcUI.setIconPosition(icon, field, this.rtl);
|
||||||
this.icon = icon;
|
this.icon = icon;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,11 +122,14 @@ TOTPFieldIcon.prototype.createIcon = function(field, segmented = false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
e.preventDefault();
|
e.stopPropagation();
|
||||||
await kpxc.receiveCredentialsIfNecessary();
|
await kpxc.receiveCredentialsIfNecessary();
|
||||||
kpxc.fillFromTOTP(field);
|
kpxc.fillFromTOTP(field);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
icon.addEventListener('mousedown', ev => ev.stopPropagation());
|
||||||
|
icon.addEventListener('mouseup', ev => ev.stopPropagation());
|
||||||
|
|
||||||
kpxcUI.setIconPosition(icon, field, this.rtl, segmented);
|
kpxcUI.setIconPosition(icon, field, this.rtl, segmented);
|
||||||
this.icon = icon;
|
this.icon = icon;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -257,6 +257,8 @@ document.addEventListener('mousemove', function(e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
if (kpxcPasswordDialog.selected === kpxcPasswordDialog.titleBar) {
|
if (kpxcPasswordDialog.selected === kpxcPasswordDialog.titleBar) {
|
||||||
const xPos = e.clientX - kpxcPasswordDialog.diffX;
|
const xPos = e.clientX - kpxcPasswordDialog.diffX;
|
||||||
const yPos = e.clientY - kpxcPasswordDialog.diffY;
|
const yPos = e.clientY - kpxcPasswordDialog.diffY;
|
||||||
|
|
@ -283,6 +285,7 @@ document.addEventListener('mousedown', function(e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e.stopPropagation();
|
||||||
kpxcUI.mouseDown = true;
|
kpxcUI.mouseDown = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -291,6 +294,7 @@ document.addEventListener('mouseup', function(e) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e.stopPropagation();
|
||||||
kpxcPasswordDialog.selected = null;
|
kpxcPasswordDialog.selected = null;
|
||||||
kpxcDefine.selected = null;
|
kpxcDefine.selected = null;
|
||||||
kpxcUI.mouseDown = false;
|
kpxcUI.mouseDown = false;
|
||||||
|
|
|
||||||
|
|
@ -91,10 +91,13 @@ UsernameFieldIcon.prototype.createIcon = function(field) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
e.preventDefault();
|
e.stopPropagation();
|
||||||
iconClicked(field, icon);
|
iconClicked(field, icon);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
icon.addEventListener('mousedown', ev => ev.stopPropagation());
|
||||||
|
icon.addEventListener('mouseup', ev => ev.stopPropagation());
|
||||||
|
|
||||||
kpxcUI.setIconPosition(icon, field, this.rtl);
|
kpxcUI.setIconPosition(icon, field, this.rtl);
|
||||||
this.icon = icon;
|
this.icon = icon;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue