mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #1857 from keepassxreboot/fix/allow_fill_to_string_fields
Allow force-fill to String Fields even if readonly
This commit is contained in:
commit
e9140247a8
2 changed files with 5 additions and 5 deletions
|
|
@ -288,7 +288,7 @@ kpxcFill.fillInStringFields = function(fields, stringFields) {
|
|||
const currentField = fields[i];
|
||||
|
||||
if (currentField && stringFieldValue[0]) {
|
||||
kpxc.setValue(currentField, stringFieldValue[0]);
|
||||
kpxc.setValue(currentField, stringFieldValue[0], true);
|
||||
filledInFields.push(currentField);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -643,7 +643,7 @@ kpxc.setPasswordFilled = async function(state) {
|
|||
};
|
||||
|
||||
// Special handling for settings value to select element
|
||||
kpxc.setValue = function(field, value) {
|
||||
kpxc.setValue = function(field, value, forced = false) {
|
||||
if (field.matches('select')) {
|
||||
value = value.toLowerCase().trim();
|
||||
const options = field.querySelectorAll('option');
|
||||
|
|
@ -658,12 +658,12 @@ kpxc.setValue = function(field, value) {
|
|||
return;
|
||||
}
|
||||
|
||||
kpxc.setValueWithChange(field, value);
|
||||
kpxc.setValueWithChange(field, value, forced);
|
||||
};
|
||||
|
||||
// Sets a new value to input field and triggers necessary events
|
||||
kpxc.setValueWithChange = function(field, value) {
|
||||
if (field.readOnly) {
|
||||
kpxc.setValueWithChange = function(field, value, forced = false) {
|
||||
if (!forced && field.readOnly) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue