Skip to content

After selecting a word suggestion in CupertinoTextField the cursor doesn't move #124405

Closed

Description

@leighajarett

When you misspell a word in CupertinoTextField you can select a suggested word. However, selecting the word doesn't move the cursor to the end of the word as expected.

Apr-07-2023 12-24-14

cc: @MitchellGoodwin @camsim99

Activity

  1. added
    a: text inputEntering text in a text field or keyboard related problems
    p: cupertino_uicupertino_ui package in flutter/packages
    on Apr 7, 2023
  2. Renzo-Olivares commented on Apr 13, 2023

    @Renzo-Olivares
    Contributor

    cc @justinmc from triage.

  3. self-assigned this
    on Apr 14, 2023
  4. justinmc commented on Apr 14, 2023

    @justinmc
    Contributor

    Thanks for the issue! I can reproduce this. I'll put up a PR soon.

    Code
    import 'package:flutter/cupertino.dart';
    import 'package:flutter/foundation.dart';
    import 'package:flutter/services.dart';
    
    void main() {
      debugDefaultTargetPlatformOverride = TargetPlatform.iOS;
      runApp(const MyApp());
    }
    
    class MyApp extends StatelessWidget {
      const MyApp({Key? key}) : super(key: key);
    
      @override
      Widget build(BuildContext context) {
        return const CupertinoApp(
          title: 'Flutter Demo',
          home: MyHomePage(title: 'Flutter Cupertino Demo'),
        );
      }
    }
    
    class MyHomePage extends StatelessWidget {
      const MyHomePage({Key? key, required this.title}) : super(key: key);
    
      final String title;
    
      @override
      Widget build(BuildContext context) {
        return CupertinoPageScaffold(
          navigationBar: const CupertinoNavigationBar(
            middle: Text('CupertinoPageScaffold Sample'),
          ),
          child: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: <Widget>[
                CupertinoTextField(
                  spellCheckConfiguration: SpellCheckConfiguration(
                    spellCheckService: DefaultSpellCheckService(),
                  ),
                ),
              ],
            ),
          ),
        );
      }
    }
  5. github-actions commented on May 2, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  6. locked as resolved and limited conversation to collaborators on May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a: text inputEntering text in a text field or keyboard related problemsp: cupertino_uicupertino_ui package in flutter/packages

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions