fix: keep system autofill out of the event participant field

This commit is contained in:
Linus Rath
2026-10-31 04:13:13 +01:00
parent b95f2c296d
commit 6c6991ace8
2 changed files with 19 additions and 0 deletions
@@ -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"/);
});
});