mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #1015 from keepassxreboot/fix/auto_submit_with_google
Fix Google login page submit
This commit is contained in:
commit
6cff401638
2 changed files with 16 additions and 1 deletions
|
|
@ -201,7 +201,10 @@ kpxcAutocomplete.keyPress = function(e) {
|
|||
}
|
||||
|
||||
kpxcAutocomplete.index = kpxcAutocomplete.elements.findIndex(c => c.value === kpxcAutocomplete.input.value);
|
||||
kpxcAutocomplete.fillPassword(kpxcAutocomplete.input.value, kpxcAutocomplete.index, kpxcAutocomplete.elements[kpxcAutocomplete.index].uuid);
|
||||
if (kpxcAutocomplete.index >= 0) {
|
||||
kpxcAutocomplete.fillPassword(kpxcAutocomplete.input.value, kpxcAutocomplete.index, kpxcAutocomplete.elements[kpxcAutocomplete.index].uuid);
|
||||
}
|
||||
|
||||
kpxcAutocomplete.closeList();
|
||||
} else if (e.key === 'Escape') {
|
||||
kpxcAutocomplete.closeList();
|
||||
|
|
|
|||
|
|
@ -156,6 +156,18 @@ kpxcForm.getCredentialFieldsFromForm = function(form) {
|
|||
// Get the form submit button instead if action URL is same as the page itself
|
||||
kpxcForm.getFormSubmitButton = function(form) {
|
||||
const action = kpxc.submitUrl || form.action;
|
||||
|
||||
// Special handling for accounts.google.com. The submit button is outside the form.
|
||||
if (form.action.startsWith('https://accounts.google.com')) {
|
||||
const findDiv = $('#identifierNext');
|
||||
if (!findDiv) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const buttons = findDiv.getElementsByTagName('button');
|
||||
return buttons.length > 0 ? buttons[0] : undefined;
|
||||
}
|
||||
|
||||
if (action.includes(document.location.origin + document.location.pathname)) {
|
||||
for (const i of form.elements) {
|
||||
if (i.type === 'submit') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue