mirror of
https://github.com/samsonjs/immich.git
synced 2026-03-25 09:15:56 +00:00
fix(mobile): do not autocorrect on endpoint input (#25696)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
0be1ffade6
commit
e63213d774
2 changed files with 4 additions and 0 deletions
|
|
@ -414,6 +414,7 @@ class LoginForm extends HookConsumerWidget {
|
||||||
keyboardAction: TextInputAction.next,
|
keyboardAction: TextInputAction.next,
|
||||||
keyboardType: TextInputType.url,
|
keyboardType: TextInputType.url,
|
||||||
autofillHints: const [AutofillHints.url],
|
autofillHints: const [AutofillHints.url],
|
||||||
|
autoCorrect: false,
|
||||||
onSubmit: (ctx, _) => ImmichForm.of(ctx).submit(),
|
onSubmit: (ctx, _) => ImmichForm.of(ctx).submit(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ class ImmichTextInput extends StatefulWidget {
|
||||||
final List<String>? autofillHints;
|
final List<String>? autofillHints;
|
||||||
final Widget? suffixIcon;
|
final Widget? suffixIcon;
|
||||||
final bool obscureText;
|
final bool obscureText;
|
||||||
|
final bool autoCorrect;
|
||||||
|
|
||||||
const ImmichTextInput({
|
const ImmichTextInput({
|
||||||
super.key,
|
super.key,
|
||||||
|
|
@ -26,6 +27,7 @@ class ImmichTextInput extends StatefulWidget {
|
||||||
this.autofillHints,
|
this.autofillHints,
|
||||||
this.suffixIcon,
|
this.suffixIcon,
|
||||||
this.obscureText = false,
|
this.obscureText = false,
|
||||||
|
this.autoCorrect = true,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -79,6 +81,7 @@ class _ImmichTextInputState extends State<ImmichTextInput> {
|
||||||
validator: _validateInput,
|
validator: _validateInput,
|
||||||
keyboardType: widget.keyboardType,
|
keyboardType: widget.keyboardType,
|
||||||
textInputAction: widget.keyboardAction,
|
textInputAction: widget.keyboardAction,
|
||||||
|
autocorrect: widget.autoCorrect,
|
||||||
autofillHints: widget.autofillHints,
|
autofillHints: widget.autofillHints,
|
||||||
onTap: () => setState(() => _error = null),
|
onTap: () => setState(() => _error = null),
|
||||||
onTapOutside: (_) => _focusNode.unfocus(),
|
onTapOutside: (_) => _focusNode.unfocus(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue