Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BrnInputText 在中间输入文字时,会自动将焦点设置为末尾 #532

Open
sheng-di opened this issue Mar 25, 2024 · 0 comments
Open

Comments

@sheng-di
Copy link

问题提交

标题格式:[BUG]: 问题简介

内容需包含:

1、BUG 描述

BrnInputText 在中间输入文字时,会自动将焦点设置为末尾

2、复现步骤

BrnInputText(
      hint: "hint",
      maxHintLines: 99,
      minLines: 5,
      maxHeight: 500,
      onTextChange: _onChanged,
      textString: _text,
      textInputAction: TextInputAction.newline,
      padding: const EdgeInsets.all(8),
      maxLength: 9999,
      // bgColor: Colors.grey[200]!,
    )

其中:

void _onChanged(String value) {
    setState(() {
      _text = value;
    });
  }

以及:

String _text = "";

3、期望行为
即使在中间输入文本,输入完毕后,文本框的焦点应该仍然在原来的位置,而不出现在文本框末尾。

4、运行环境

  • 运行设备: iOS
  • 系统: 16.4
  • Bruno 版本: 3.4.2
  • Flutter Doctor 信息
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.2, on macOS 13.6 22G120 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.3.4)
[✓] VS Code (version 1.87.2)
[✓] Connected device (3 available)

5、附加信息

包括视频、图片等补充信息

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant