work around chrome autocomplete for passwords

This commit is contained in:
j 2019-07-30 13:10:21 +02:00
parent 0147b56d69
commit 0dc1f22abf

View file

@ -43,7 +43,7 @@ pandora.ui.preferencesDialog = function() {
id: 'password', id: 'password',
label: Ox._('New Password'), label: Ox._('New Password'),
labelWidth: 120, labelWidth: 120,
type: 'password', type: 'text',
validate: pandora.validateNewPassword, validate: pandora.validateNewPassword,
width: 320 width: 320
}) })
@ -51,6 +51,11 @@ pandora.ui.preferencesDialog = function() {
autocomplete: 'new-password' autocomplete: 'new-password'
}) })
.bindEvent({ .bindEvent({
focus: function(data) {
this.options({
type: 'password'
})
},
validate: function(data) { validate: function(data) {
data.valid && pandora.api.editPreferences({password: data.value}); data.valid && pandora.api.editPreferences({password: data.value});
} }