Try to disable remembering password
This commit is contained in:
parent
2660e791d1
commit
8019c81600
@ -196,6 +196,12 @@ class InputField {
|
||||
this.input = input;
|
||||
}
|
||||
|
||||
public select() {
|
||||
if((this.input as HTMLInputElement).value) { // * avoid selecting whole empty field on iOS devices
|
||||
(this.input as HTMLInputElement).select(); // * select text
|
||||
}
|
||||
}
|
||||
|
||||
public setLabel() {
|
||||
this.label.textContent = '';
|
||||
if(this.options.labelText) {
|
||||
|
@ -22,11 +22,19 @@ export default class PasswordInputField extends InputField {
|
||||
input.type = 'password';
|
||||
input.setAttribute('required', '');
|
||||
input.autocomplete = 'off';
|
||||
input.readOnly = true;
|
||||
/* input.readOnly = true;
|
||||
|
||||
input.addEventListener('focus', () => {
|
||||
input.removeAttribute('readonly');
|
||||
}, {once: true});
|
||||
}, {once: true}); */
|
||||
|
||||
// * https://stackoverflow.com/a/35949954/6758968
|
||||
const stealthy = document.createElement('input');
|
||||
stealthy.classList.add('stealthy');
|
||||
stealthy.tabIndex = -1;
|
||||
stealthy.type = 'password';
|
||||
input.parentElement.prepend(stealthy);
|
||||
input.parentElement.insertBefore(stealthy.cloneNode(), input.nextSibling);
|
||||
|
||||
const toggleVisible = this.toggleVisible = document.createElement('span');
|
||||
toggleVisible.classList.add('toggle-visible', 'tgico');
|
||||
|
@ -130,6 +130,7 @@ export default class AppTwoStepVerificationEnterPasswordTab extends SliderSuperT
|
||||
textEl.key = 'TwoStepAuth.InvalidPassword';
|
||||
textEl.update();
|
||||
preloader.remove();
|
||||
passwordInputField.select();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -89,9 +89,11 @@ let onFirstMount = (): Promise<any> => {
|
||||
break; */
|
||||
}
|
||||
}).catch(async(err) => {
|
||||
let good = false;
|
||||
switch(err.type) {
|
||||
case 'SESSION_PASSWORD_NEEDED':
|
||||
//console.warn('pageAuthCode: SESSION_PASSWORD_NEEDED');
|
||||
good = true;
|
||||
err.handled = true;
|
||||
await pagePassword.mount();
|
||||
break;
|
||||
@ -109,6 +111,10 @@ let onFirstMount = (): Promise<any> => {
|
||||
break;
|
||||
}
|
||||
|
||||
if(!good) {
|
||||
codeInputField.select();
|
||||
}
|
||||
|
||||
codeInput.removeAttribute('disabled');
|
||||
});
|
||||
};
|
||||
|
@ -100,6 +100,7 @@ let onFirstMount = (): Promise<any> => {
|
||||
default:
|
||||
//btnNext.innerText = err.type;
|
||||
btnNextI18n.update({key: 'PASSWORD_HASH_INVALID'});
|
||||
passwordInput.select();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -157,9 +157,7 @@ let onFirstMount = () => {
|
||||
void selectWrapper.offsetWidth; // reflow
|
||||
selectWrapper.classList.add('active');
|
||||
|
||||
if(countryInput.value) { // * avoid selecting whole empty field on iOS devices
|
||||
countryInput.select(); // * select text
|
||||
}
|
||||
countryInputField.select();
|
||||
|
||||
fastSmoothScroll(page.pageEl.parentElement.parentElement, countryInput, 'start', 4);
|
||||
|
||||
|
@ -1149,3 +1149,17 @@ middle-ellipsis-element {
|
||||
font-size: 20px !important;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
.stealthy {
|
||||
left: 0;
|
||||
margin: 0;
|
||||
max-height: 1px;
|
||||
max-width: 1px;
|
||||
opacity: 0;
|
||||
outline: none;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user