Fixed all input boxes in pgAdmin to show browser auto-fill only where it is relevant. #2410

This commit is contained in:
Pravesh Sharma 2024-04-24 11:27:08 +05:30 committed by GitHub
parent 9f6ddd3cf9
commit fd65f1b644
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 7 additions and 5 deletions

View File

@ -141,7 +141,7 @@ export default function AboutComponent() {
}}>{copyText}</DefaultButton>
</Box>
<Box flexGrow="1" paddingTop="1px">
<InputText style={{height: '100%'}} controlProps={{multiline: true}} inputStyle={{resize: 'none', height: '100%'}}
<InputText style={{height: '100%'}} controlProps={{multiline: true, rows: 8}} inputStyle={{resize: 'none'}}
value={aboutData.settings}/>
</Box>
</Box>

View File

@ -224,7 +224,8 @@ export default class ServerSchema extends BaseUISchema {
return state.connect_now && obj.isNew(state);
},
controlProps: {
maxLength: null
maxLength: null,
autoComplete: 'new-password'
},
disabled: function(state) {return state.kerberos_conn;},
},{

View File

@ -36,7 +36,8 @@ class ChangePasswordSchema extends BaseUISchema {
id: 'password', label: gettext('Current Password'), type: 'password',
disabled: self.isPgpassFileUsed, noEmpty: !self.isPgpassFileUsed,
controlProps: {
maxLength: null
maxLength: null,
autoComplete: 'new-password'
}
}, {
id: 'newPassword', label: gettext('New Password'), type: 'password',

View File

@ -91,7 +91,7 @@ export default function MasterPasswordContent({ closeModal, onResetPassowrd, onO
</Box>
<Box marginTop='12px'>
<InputText inputRef={firstEleRef} type="password" value={formData['password']} maxLength={null}
onChange={(e) => onTextChange(e, 'password')} onKeyDown={(e) => onKeyDown(e)}/>
onChange={(e) => onTextChange(e, 'password')} onKeyDown={(e) => onKeyDown(e)} controlProps={{autoComplete: 'new-password'}}/>
</Box>
<FormFooterMessage type={MESSAGE_TYPE.ERROR} message={data.errmsg} closable={false} style={{
position: 'unset', padding: '12px 0px 0px'

View File

@ -394,7 +394,7 @@ export const InputText = forwardRef(({
'aria-describedby': helpid,
...(type ? { pattern: !_.isUndefined(controlProps) && !_.isUndefined(controlProps.pattern) ? controlProps.pattern : patterns[type] } : {}),
style: inputStyle || {},
autoComplete: _.isUndefined(controlProps?.autoComplete) ? 'nope' : controlProps?.autoComplete,
autoComplete: _.isUndefined(controlProps?.autoComplete) ? 'off' : controlProps?.autoComplete,
'data-testid': 'input-text',
title: controlProps?.title,
}}