π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile] add different group IDs to disabled and non-disabled text fields
Priyanshu Dangare289954e66eb2
diff --git a/mobile/packages/ente_components/lib/components/text_input_component.dart b/mobile/packages/ente_components/lib/components/text_input_component.dartindex 8e2895e906..830498ad61 100644--- a/mobile/packages/ente_components/lib/components/text_input_component.dart+++ b/mobile/packages/ente_components/lib/components/text_input_component.dart@@ -133,6 +133,7 @@ class _TextInputComponentState extends State<TextInputComponent> {@overridevoid initState() {super.initState();+ _configureGroupId();widget.submitNotifier?.addListener(_handleSubmitRequested);widget.cancelNotifier?.addListener(_handleCancel);_internalController = widget.controller == null@@ -200,6 +201,23 @@ class _TextInputComponentState extends State<TextInputComponent> {super.dispose();}+ Object? _groupId;+ final _defaultGroupId = Object();+ final _disabledGroupId = Object();++ @override+ void didChangeDependencies() {+ _configureGroupId();+ super.didChangeDependencies();+ }++ void _configureGroupId() {+ _groupId = _defaultGroupId;+ if (widget.isDisabled) {+ _groupId = _disabledGroupId;+ }+ }+@overrideWidget build(BuildContext context) {final colors = context.componentColors;@@ -233,6 +251,7 @@ class _TextInputComponentState extends State<TextInputComponent> {const SizedBox(height: Spacing.sm),],TextFieldTapRegion(+ groupId: _groupId,child: GestureDetector(behavior: HitTestBehavior.opaque,onTap: widget.isDisabled ? null : _focusNode.requestFocus,