Skip to content

[Web][HTML]: cursor offset is incorrect when typing CJK  #148271

@JAICHANGPARK

Description

@JAICHANGPARK

Steps to reproduce

The flutter sdk used version 3.22. (stable channel)
This occurs when the renderer is set to HTML.
When setting a text field to allow multi-line input and entering Korean, the cursor position is displayed strangely.
There are no problems with English input.

 Container(
              margin: const EdgeInsets.symmetric(horizontal: 8),
              child: TextFormField(
                minLines: 4,
                maxLines: 15,
                focusNode: indicatorFocusNode,
                controller: indicatorTextEditingController,
                decoration: InputDecoration(
                  border: const OutlineInputBorder(),
                  enabledBorder: const OutlineInputBorder(
                    borderSide: BorderSide(
                      color: Color(0xffCDD4E0),
                    ),
                  ),
                ),
              ),
            ),

Thanks

Expected results

There should be no problem with the cursor display.

Actual results

This problem did not occur in version 3.19.

Screen.Recording.2024-05-14.at.9.05.55.AM.mov

Code sample

Code sample
 Container(
              margin: const EdgeInsets.symmetric(horizontal: 8),
              child: TextFormField(
                minLines: 4,
                maxLines: 15,
                focusNode: indicatorFocusNode,
                controller: indicatorTextEditingController,
                decoration: InputDecoration(
                  border: const OutlineInputBorder(),
                  enabledBorder: const OutlineInputBorder(
                    borderSide: BorderSide(
                      color: Color(0xffCDD4E0),
                    ),
                  ),
                ),
              ),
            ),

Screenshots or Video

Screenshots / Video demonstration
Screen.Recording.2024-05-14.at.9.05.55.AM.mov

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.22.0, on Debian GNU/Linux 11 (bullseye) 4.14.186-146.268.amzn2.x86_64, locale en_US)
• Flutter version 3.22.0 on channel stable at /usr/local/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5dcb86f68f (4 days ago), 2024-05-09 07:39:20 -0500
• Engine revision f6344b75dc
• Dart version 3.4.0
• DevTools version 2.34.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: internationalizationSupporting other languages or locales. (aka i18n)a: text inputEntering text in a text field or keyboard related problemsc: regressionIt was better in the past than it is nowe: web_htmlHTML rendering backend for Webengineflutter/engine related. See also e: labels.found in release: 3.22Found to occur in 3.22fyi-text-inputFor the attention of Text Input teamhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-webWeb applications specificallyr: solvedIssue is closed as solvedteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions