Skip to content

When validatorof TextFormField widget returns an AppLozalizations.of(context).translationKey value, error message does not refresh with locale change #143729

Description

@fulstadev

Steps to reproduce

  1. Create a Form in your Flutter App using a TextFormField().
  2. Localize your Flutter app according to the docs.
  3. Build simple form validation according to the docs, by returning a localized string via the validator (e.g. AppLocalizations.of(context).myTranslation).
  4. Test the app using flutter run, and provide invalid input and trigger validation.
  5. This will show an according error message displayed in the current app locale.
  6. Trigger a locale language switch in your app (we're currently doing this using a provider to whose value the locale property of the MaterialApp / CupertinoApp listens to).

Expected results

The locale should be switched in the entire app, to the language to which the locale switch occurred.

Actual results

Every string present in the app via AppLocalizations.of(context)... changes, except for the strings returned via the validator property in the TextFormField() widget & displayed in the way mentioned above before the language switch. Only a new call to formKey.currentState.validate() will refresh the validation error messages according to the newly selected language.

This issue has also been mentioned on so, still without a really viable solution.

Code sample

Code sample
you may consider https://stackoverflow.com/questions/52217090/internationalization-problem-when-i-switch-languages as an example.

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.16.4, on macOS 14.2.1 23C71 darwin-arm64, locale de-CH)
    • Flutter version 3.16.4 on channel stable at /Users/inkognito/dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2e9cb0aa71 (2 months ago), 2023-12-11 14:35:13 -0700
    • Engine revision 54a7145303
    • Dart version 3.2.3
    • DevTools version 2.28.4

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/inkognito/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A507
    • CocoaPods version 1.14.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 77.3.1
    • Dart plugin version 233.13763.5

[✓] Connected device (3 available)
    • iPhone 15 Pro Max (mobile) • 1EF3E08B-D6C6-4D80-89B7-A97F5CDA6C61 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-17-0 (simulator)
    • macOS (desktop)            • macos                                • darwin-arm64   • macOS 14.2.1 23C71
      darwin-arm64
    • Chrome (web)               • chrome                               • web-javascript • Google Chrome
      119.0.6045.159

[✓] Network resources
    • All expected network resources are available.

• No issues found!

Activity

  1. added
    in triage
    on Feb 20, 2024
  2. dam-ease commented on Feb 20, 2024

    @dam-ease

    Thanks for filing this @fulstadev.
    I seem to be missing out on a step, can you please provide a minimal complete reproducible code sample that doesn’t include 3rd party plugins or complex production code?

  3. added
    waiting for response
    on Feb 20, 2024
  4. github-actions commented on Mar 12, 2024

    @github-actions

    Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
    If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
    Thanks for your contribution.

  5. fulstadev commented on Mar 24, 2024

    @fulstadev
    Author

    So it took us some time to make an example that is as simple as possible and represents our app as good as possible, so there you go, step-by-step:

    1. To use custom localizations in our Flutter app without relying on any third-party plugins, we followed the instructions listed here: https://docs.flutter.dev/ui/accessibility-and-internationalization/internationalization
    2. This lead to the following components / app code:

    /pubspec.yml:

    name: dummy
    description: "A new Flutter project."
    publish_to: 'none' # Remove this line if you wish to publish to pub.dev
    version: 1.0.0+1
    environment:
      sdk: '>=3.3.1 <4.0.0'
    dependencies:
      flutter:
        sdk: flutter
      cupertino_icons: ^1.0.6
      flutter_localizations:
        sdk: flutter
      intl: any
    dev_dependencies:
      flutter_test:
        sdk: flutter
      flutter_lints: ^3.0.0
    flutter:
      uses-material-design: true
      generate: true
    

    /l10n.yml:

    arb-dir: lib/l10n
    template-arb-file: app_de.arb
    output-localization-file: app_localizations.dart
    use-escaping: false
    nullable-getter: false
    use-deferred-loading: false
    

    /lib/l10n/app_de.arb:

    {
      "hello": "Hallo!",
      "validateForm": "Formular prüfen",
      "switchLanguage": "Sprache wechseln",
      "sampleErrorMessage": "Beispiel-Fehler-Nachricht"
    }
    

    /lib/l10n/app_en.arb:

    {
      "hello": "Hello!",
      "validateForm": "Validate Form",
      "switchLanguage": "Switch Language",
      "sampleErrorMessage": "Sample Error Message"
    }
    

    /lib/main.dart:

    import 'package:flutter/material.dart';
    import 'package:flutter_gen/gen_l10n/app_localizations.dart';
    
    void main() {
      runApp(
        const MyApp(),
      );
    }
    
    enum AppsLocales {
      de,
      en;
    }
    
    class MyApp extends StatefulWidget {
      const MyApp({
        super.key,
      });
    
      @override
      State<MyApp> createState() => _MyAppState();
    }
    
    class _MyAppState extends State<MyApp> {
      late AppsLocales appLocale;
    
      /// Switch current locale to english if it's currently german, and to german if
      /// it's currently english
      void switchLocale() {
        setState(
          () {
            appLocale =
                (appLocale == AppsLocales.de) ? AppsLocales.en : AppsLocales.de;
          },
        );
      }
    
      @override
      void initState() {
        appLocale = AppsLocales.en;
        super.initState();
      }
    
      // This widget is the root of your application.
      @override
      Widget build(BuildContext context) {
        return MaterialApp(
          title: 'Flutter Demo',
          locale: Locale(appLocale.name),
          home: MyHomePage(
            switchLocale: switchLocale,
          ),
          localizationsDelegates: AppLocalizations.localizationsDelegates,
          supportedLocales: AppLocalizations.supportedLocales,
        );
      }
    }
    
    class MyHomePage extends StatefulWidget {
      final void Function() switchLocale;
    
      const MyHomePage({
        super.key,
        required this.switchLocale,
      });
    
      @override
      State<MyHomePage> createState() => _MyHomePageState();
    }
    
    class _MyHomePageState extends State<MyHomePage> {
      final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          appBar: AppBar(
            backgroundColor: Colors.blue,
            title: Text(AppLocalizations.of(context).hello),
          ),
          body: Padding(
            padding: const EdgeInsets.all(15.0),
            child: Form(
              key: _formKey,
              child: Column(
                children: [
                  const SizedBox(
                    height: 20,
                  ),
                  TextFormField(
                    validator: (String? value) {
                      return (value == null || value.isEmpty)
                          ? AppLocalizations.of(context).sampleErrorMessage
                          : '';
                    },
                  ),
                  const SizedBox(
                    height: 20,
                  ),
                  ElevatedButton(
                    onPressed: () {
                      _formKey.currentState!.validate();
                    },
                    child: Text(
                      AppLocalizations.of(context).validateForm,
                    ),
                  ),
                  const SizedBox(
                    height: 20,
                  ),
                  ElevatedButton(
                    onPressed: widget.switchLocale,
                    child: Text(
                      AppLocalizations.of(context).switchLanguage,
                    ),
                  ),
                ],
              ),
            ),
          ), // This trailing comma makes auto-formatting nicer for build methods.
        );
      }
    }
    

    We explicitly want to enable in-app localization, independently of the locale set for the device, during runtime. To visualize our problem, with the app code above:

    1. Run the application with flutter run.
    2. Click on the first Validate Form button without providing any text to the text form field.
    3. This should display an error message in english below it, saying Sample Error Message.
    4. Click on the second Switch Language button. Everything in the App changes to german, except from the error message of the text form field.
    5. Click on the Validate Form button again, and the error message now shows up in german (which we expected to happen after step 4.).

    flutter doctor -v output:

    [✓] Flutter (Channel stable, 3.19.3, on macOS 14.4 23E214 darwin-arm64, locale de-CH)
        • Flutter version 3.19.3 on channel stable at /Users/inkognito/dev/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision ba39319843 (2 weeks ago), 2024-03-07 15:22:21 -0600
        • Engine revision 2e4ba9c6fb
        • Dart version 3.3.1
        • DevTools version 2.31.1
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
        • Android SDK at /Users/inkognito/Library/Android/sdk
        • Platform android-34, build-tools 34.0.0
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 15.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 15E204a
        • CocoaPods version 1.14.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.3)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.3.5)
        • IntelliJ at /Applications/IntelliJ IDEA.app
        • Flutter plugin version 78.4.2
        • Dart plugin version 233.14888
    
    [✓] Connected device (3 available)
        • iPhone 15 (mobile) • A79255C5-A054-4C5F-924E-9A0686DC3F35 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-4
          (simulator)
        • macOS (desktop)    • macos                                • darwin-arm64   • macOS 14.4 23E214 darwin-arm64
        • Chrome (web)       • chrome                               • web-javascript • Google Chrome 123.0.6312.59
    
    [✓] Network resources
        • All expected network resources are available.
    
    • No issues found!
    
  6. removed
    waiting for response
    on Mar 24, 2024
  7. darshankawar commented on Mar 25, 2024

    @darshankawar
    Member

    Thanks for the detailed steps to replicate and code. Using it, I was able to replicate the reported behavior.

    stable, master flutter doctor -v
    [!] Flutter (Channel stable, 3.19.3, on macOS 12.2.1 21D62 darwin-x64, locale
        en-GB)
        • Flutter version 3.19.3 on channel stable at
          /Users/dhs/documents/fluttersdk/flutter
        ! Warning: `flutter` on your path resolves to
          /Users/dhs/Documents/Fluttersdk/flutter/bin/flutter, which is not inside
          your current Flutter SDK checkout at
          /Users/dhs/documents/fluttersdk/flutter. Consider adding
          /Users/dhs/documents/fluttersdk/flutter/bin to the front of your path.
        ! Warning: `dart` on your path resolves to
          /Users/dhs/Documents/Fluttersdk/flutter/bin/dart, which is not inside your
          current Flutter SDK checkout at /Users/dhs/documents/fluttersdk/flutter.
          Consider adding /Users/dhs/documents/fluttersdk/flutter/bin to the front
          of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision ba39319843 (5 days ago), 2024-03-07 15:22:21 -0600
        • Engine revision 2e4ba9c6fb
        • Dart version 3.3.1
        • DevTools version 2.31.1
        • If those were intentional, you can disregard the above warnings; however
          it is recommended to use "git" directly to perform update checks and
          upgrades.
    
    [!] Xcode - develop for iOS and macOS (Xcode 12.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        ! Flutter recommends a minimum Xcode version of 13.
          Download the latest version or update via the Mac App Store.
        • CocoaPods version 1.11.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] VS Code (version 1.62.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.21.0
    
    [✓] Connected device (5 available)
        • SM G975F (mobile)       • RZ8M802WY0X • android-arm64   • Android 11 (API 30)
        • Darshan's iphone (mobile)  • 21150b119064aecc249dfcfe05e259197461ce23 •
          ios            • iOS 14.4.1 18D61
        • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729     •
          ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
        • macOS (desktop)            • macos                                    •
          darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
        • Chrome (web)               • chrome                                   •
          web-javascript • Google Chrome 98.0.4758.80
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    
    ! Doctor found issues in 1 category.
    
    [!] Flutter (Channel master, 3.21.0-12.0.pre.42, on macOS 12.2.1 21D62
        darwin-x64, locale en-GB)
        • Flutter version 3.21.0-12.0.pre.42 on channel master at
          /Users/dhs/documents/fluttersdk/flutter
        ! Warning: `flutter` on your path resolves to
          /Users/dhs/Documents/Fluttersdk/flutter/bin/flutter, which is not inside
          your current Flutter SDK checkout at
          /Users/dhs/documents/fluttersdk/flutter. Consider adding
          /Users/dhs/documents/fluttersdk/flutter/bin to the front of your path.
        ! Warning: `dart` on your path resolves to
          /Users/dhs/Documents/Fluttersdk/flutter/bin/dart, which is not inside your
          current Flutter SDK checkout at /Users/dhs/documents/fluttersdk/flutter.
          Consider adding /Users/dhs/documents/fluttersdk/flutter/bin to the front
          of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 5fab92f062 (23 minutes ago), 2024-03-22 00:56:12 -0400
        • Engine revision f9a34ae0b1
        • Dart version 3.4.0 (build 3.4.0-257.0.dev)
        • DevTools version 2.34.0-dev.5
        • If those were intentional, you can disregard the above warnings; however
          it is recommended to use "git" directly to perform update checks and
          upgrades.
    
    [!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at /Users/dhs/Library/Android/sdk
        ✗ cmdline-tools component is missing
          Run `path/to/sdkmanager --install "cmdline-tools;latest"`
          See https://developer.android.com/studio/command-line for more details.
        ✗ Android license status unknown.
          Run `flutter doctor --android-licenses` to accept the SDK licenses.
          See https://flutter.dev/docs/get-started/install/macos#android-setup for
          more details.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 13C100
        • CocoaPods version 1.11.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
        • IntelliJ at /Applications/IntelliJ IDEA.app
        • Flutter plugin version 65.1.4
        • Dart plugin version 213.7228
    
    [✓] VS Code (version 1.62.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.29.0
    
    [✓] Connected device (3 available)
        • Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 • ios
          • iOS 15.3.1 19D52
        • macOS (desktop)           • macos                                    •
          darwin-x64     • macOS 12.2.1 21D62 darwin-x64
        • Chrome (web)              • chrome                                   •
          web-javascript • Google Chrome 109.0.5414.119
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
          
    [!] Xcode - develop for iOS and macOS (Xcode 12.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        ! Flutter recommends a minimum Xcode version of 13.
          Download the latest version or update via the Mac App Store.
        • CocoaPods version 1.11.2
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] VS Code (version 1.62.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.21.0
    
    [✓] Connected device (5 available)
        • SM G975F (mobile)       • RZ8M802WY0X • android-arm64   • Android 11 (API 30)
        • Darshan's iphone (mobile)  • 21150b119064aecc249dfcfe05e259197461ce23 •
          ios            • iOS 14.4.1 18D61
        • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729     •
          ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
        • macOS (desktop)            • macos                                    •
          darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
        • Chrome (web)               • chrome                                   •
          web-javascript • Google Chrome 98.0.4758.80
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    
    ! Doctor found issues in 1 category.
    
    
    
    
  8. added
    framework
    a: internationalization
    has reproducible steps
    team-framework
    found in release: 3.19
    found in release: 3.21
    and removed
    in triage
    on Mar 25, 2024
  9. added
    team-text-input
    and removed
    team-framework
    on Mar 26, 2024
  10. xhejmspuka commented on May 13, 2024

    @xhejmspuka

    any update on this?

  11. Hamza3620 commented on May 17, 2024

    @Hamza3620

    Hi, I am facing the same issue. Any update on the fix please?

  12. Hamza3620 commented on Aug 15, 2024

    @Hamza3620

    Hi @darshankawar ! Would this be resolved in versions 3.22.0 or 3.24.0?
    I can still reproduce on 3.19.6, so I look forward to a response if upgrading could fix this.
    Thanks!

  13. loic-sharma commented on Aug 22, 2025

    @loic-sharma
    Member

    I suspect to fix this we need to re-run FormField.validators when dependencies change. This would ensure that we rebuild error messages when the locale changes. This might require adding a context argument to the FormFieldValidator callback so that the TextFormField can be aware of its validator's dependencies.

  14. added
    P3
    triaged-text-input
    on Aug 22, 2025
  15. pro100andrey commented on Oct 20, 2025

    @pro100andrey

    Hello everyone, I also ran into this problem and want to share my temporary workaround:

    Code
    /// A wrapper around Flutter's [Form] widget that manages a
    /// [GlobalKey<FormState>] and provides utility methods for validation and
    /// saving.
    ///
    /// It also implements custom logic to correctly refresh validation errors
    /// when the application's locale changes.
    class BaseForm extends StatefulWidget {
      const BaseForm({
        required this.builder,
        this.autovalidateMode = AutovalidateMode.disabled,
        super.key,
      });
    
      /// A function that builds the form's content. It receives the [BuildContext]
      /// and the [BaseFormState] instance, allowing form controls to interact
      /// with the form's validation logic (e.g., calling validateAndSave).
      final Widget Function(BuildContext context, BaseFormState state) builder;
    
      @override
      State<BaseForm> createState() => BaseFormState();
    
      /// Controls how and when form fields are automatically validated.
      /// Defaults to [AutovalidateMode.disabled].
      final AutovalidateMode autovalidateMode;
    }
    
    class BaseFormState extends State<BaseForm> {
      /// The global key used to uniquely identify the [Form] and allow
      /// validation and saving operations.
      final _formKey = GlobalKey<FormState>();
    
      /// Stores the last known application [Locale]. Used to detect changes
      /// in the application's language settings.
      Locale? _locale;
    
      /// A flag indicating whether validation has been explicitly attempted
      /// (by user action or button press) or if the form is in
      /// [AutovalidateMode.always] mode. This is essential for conditionally
      /// refreshing localized errors.
      bool _didValidate = false;
    
      @override
      void initState() {
        super.initState();
    
        // Initialize _didValidate to true if the mode is set to always,
        // as errors should be visible from the start.
        _didValidate = widget.autovalidateMode == AutovalidateMode.always;
      }
    
      @override
      void didUpdateWidget(covariant BaseForm oldWidget) {
        super.didUpdateWidget(oldWidget);
    
        final currentLocale = Localizations.localeOf(context);
    
        // Check if the application's locale has changed.
        if (_locale != currentLocale) {
          _locale = currentLocale;
    
          // Only refresh validation errors if validation has already been
          // attempted. This respects the [AutovalidateMode.disabled] setting
          // before the first interaction.
          if (_didValidate) {
            // Use a post-frame callback to ensure the form's content has been
            // rebuilt with the new locale before running the validator. This
            // ensures errors are translated correctly.
            WidgetsBinding.instance.addPostFrameCallback((_) {
              _formKey.currentState?.validate();
            });
          }
        }
      }
    
      @override
      Widget build(BuildContext context) => Form(
        autovalidateMode: widget.autovalidateMode,
        // Use [onChanged] to detect the user's first interaction with any field.
        onChanged: () {
          if (!_didValidate &&
              widget.autovalidateMode != AutovalidateMode.disabled) {
            // Set the flag to true to enable error visibility, effectively
            // implementing the start of [AutovalidateMode.onUserInteraction]
            // behavior.
            _didValidate = true;
          }
        },
        key: _formKey,
        child: widget.builder(context, this),
      );
    
      /// Validates all form fields and saves them if validation succeeds.
      ///
      /// Returns `true` if the form is valid and saved, `false` otherwise.
      bool validateAndSave() {
        // Explicitly set the flag to true to ensure errors are visible after
        // a manual submission attempt.
        if (!_didValidate) {
          _didValidate = true;
        }
    
        if (_formKey.currentState!.validate()) {
          _formKey.currentState!.save();
    
          return true;
        }
    
        return false;
      }
    }
    

    How to use:

    ...
    BaseForm(
      builder: (context, state) => Column(
        spacing: 16,
        children: [
          ...
          InputFormField(
            label: Text(S.current.email),
            validator: (value) {
              if (value == null || value.isEmpty) {
                return S.current.invalidEmail;
              }
              return null;
            },
          ),
          FilledButton(
            onPressed: () {
              if (state.validateAndSave()) {
                onLogInPressed();
              }
            },
            child: Text(S.current.signIn),
          ),
          ...
  16. pedrisbel commented on Jun 24, 2026

    @pedrisbel

    any update? same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3a: internationalizationfound in release: 3.19found in release: 3.21frameworkhas reproducible stepsteam-text-inputtriaged-text-input

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions