mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-03 00:06:39 +00:00
fix: keep system autofill out of the event participant field
This commit is contained in:
@@ -117,6 +117,10 @@ export function ParticipantInput({ attendees, onAdd, onRemove }: ParticipantInpu
|
||||
autoCapitalize="none"
|
||||
autoCorrect={false}
|
||||
keyboardType="email-address"
|
||||
// The app's own suggestions only: system autofill would cover them.
|
||||
autoComplete="off"
|
||||
importantForAutofill="no"
|
||||
textContentType="none"
|
||||
onSubmitEditing={handleSubmit}
|
||||
onBlur={handleSubmit}
|
||||
returnKeyType="done"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
|
||||
// Checked on the source: the suite has no React Native renderer.
|
||||
const source = fs.readFileSync(path.resolve(__dirname, '../ParticipantInput.tsx'), 'utf8');
|
||||
|
||||
describe('ParticipantInput wiring', () => {
|
||||
it('offers no system autofill in the participant address field, as the composer\u2019s fields do', () => {
|
||||
const input = source.slice(source.indexOf('<TextInput'), source.indexOf('/>', source.indexOf('<TextInput')));
|
||||
expect(input).toMatch(/autoComplete="off"/);
|
||||
expect(input).toMatch(/importantForAutofill="no"/);
|
||||
expect(input).toMatch(/textContentType="none"/);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user