Repository navigation
TextField cursor stands in a wrong position while using persian words #120604
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsdependency: skiaSkia team may need to help usSkia team may need to help use: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for WebCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.7Found to occur in 3.7Found to occur in 3.7found in release: 3.8Found to occur in 3.8Found to occur in 3.8has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specificallyplatform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
That is really annoying. TextField(s) are ruining all my days and nights. This is not the first issue I am encountering since I'm using flutter but I hope this would be the last.
Steps to reproduce this problem are so easy. create a flutter application. make sure you are using flutter 3.7.3 (the latest version on stable channel). use a simple TextField widget. Type a simple word in persian (or Arabic) with no space in the end. (e.g. سلام در حال تست). After typing that, click on the last character. The thing is cursor is not in the right position which you can see in the picture I am sharing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: internationalizationSupporting other languages or locales. (aka i18n)Supporting other languages or locales. (aka i18n)a: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsdependency: skiaSkia team may need to help usSkia team may need to help use: web_canvaskitCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for WebCanvasKit (a.k.a. Skia-on-WebGL) rendering backend for Webengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.7Found to occur in 3.7Found to occur in 3.7found in release: 3.8Found to occur in 3.8Found to occur in 3.8has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specificallyplatform-webWeb applications specificallyWeb applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team

Activity
moffatman commentedon Feb 13, 2023
Can you try out the master channel and see if it's fixed there? I've made an improvement for clicking on the last character in right-to-left text.
darshankawar commentedon Feb 14, 2023
@mhbdev
flutter channel masterflutter upgradeand try to run your scenario again.mhbdev commentedon Feb 14, 2023
@darshankawar @moffatman
I tried master channel and the problem still exists.
moffatman commentedon Feb 14, 2023
@mhbdev What's the exact revision (
flutter doctor -v)?mhbdev commentedon Feb 15, 2023
Here you are @moffatman
[√] Flutter (Channel master, 3.8.0-12.0.pre.52, on Microsoft Windows [Version 10.0.19045.2486], locale en-US)
• Flutter version 3.8.0-12.0.pre.52 on channel master at C:\FlutterSdk\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 17b4c70 (14 hours ago), 2023-02-14 10:07:02 +0000
• Engine revision cbb7fc0
• Dart version 3.0.0 (build 3.0.0-233.0.dev)
• DevTools version 2.21.1
• Pub download mirror https://pub.flutter-io.cn
moffatman commentedon Feb 15, 2023
What operating system do you see the problem on? I tried with the string you posted "سلام در حال تست", and it looks correct for me on iOS using latest master channel.
mhbdev commentedon Feb 15, 2023
I am on Windows tried this example on chrome web.
moffatman commentedon Feb 15, 2023
Ah, on Web, I think we need to wait for a new CanvasKit to release to include the fix.
Do you know the next expected release? @jason-simmons
darshankawar commentedon Feb 16, 2023
I was able to verify and replicate the reported behavior. This occurs on web using canvaskit renderer on latest master and stable versions:
120604.mov
With html renderer, the cursor goes properly to the position:
This only seems to be happening on web platform, as on desktop, it works as expected.
A similar / related issue: #81013
stable, master flutter doctor -v
16 remaining items
mhbdev commentedon Mar 25, 2023
I am facing this issue on both platforms. Android and Web.
ammarqusailah commentedon Apr 15, 2023
This solution worked for me with Android and Windows
abdullahqasemi commentedon Apr 16, 2023
this worked for me
Thanks
LongCatIsLooong commentedon Oct 26, 2023
Tried with canvaskit renderer and on linux. The issue doesn't seem reproducible on the master branch. Closing.
github-actions commentedon Nov 10, 2023
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 -vand a minimal reproduction of the issue.