web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Cursor jumping to the ...
Power Apps
Suggested Answer

Cursor jumping to the beginning of modern TextInput when autocorrect is enabled on Android

(1) ShareShare
ReportReport
Posted on by 54
Hi, 

Has anyone noticed a problem with the cursor jumping to the beginning of the modern TextInput controller, when using the autocorrect feature on a mobile phone with the Android operating system?

In my application I use modern TextInput (recently updated).
Through diagnostics I found:
When I have autocorrect enabled on IOs -> the problem does not occur here.
But when I run the application on Android with autocorrect enabled, when using it, the entire (corrected) word is moved to the beginning of TextInput and the cursor is set after this corrected word.

This strange problem does not occur with classic TextInput.
-----------------------------------------------------------------
Here is the code for a modern TextInput:
- txt_popis_vsa_3:
    Control: ModernTextInput@1.0.0
    Properties:
      Default: |-
        =//momentalne pozastavne
        //DataTable_aktivity_2.Selected.Popis
        //ctxPopisEdit
 
        //v testovacej faze
        If(tgl_zobraz_modernTable.Checked,
            modernTable_aktivity.Selected.Popis      
            ,
            First(colSelectedRecord).Popis
            //predtym funguje  
            //DataTable_aktivity_2.Selected.Popis
        )
      DisplayMode: DisplayMode.Edit
      FillPortions: =1
      FontWeight: =""
      Height: =100
      LayoutMinWidth: =290
      MaxLength: =-1
      OnChange: |-
        =
       
 
         //UpdateContext({ ctxPopisEdit: Self.Text });;
        //uklada vsetko do pomocnej tabulky
        Select(btn_SaveControl_pred_ulozenim)
     
Placeholder: =""
      Size: =12
      TriggerOutput: =TriggerOutput.FocusOut
      Type: =TextInputType.Multiline
      ValidationState: =If(IsBlank(Self.Text),"Error","None")
      Visible: |-
                false
      Width: =315
      X: =rectan_horizontalna_2.X + 20
      Y: =lbl_popis_3.Y+lbl_popis_3.Height
-----------------------------------------------------

Copilot convinced me that the problem is a combination of Android + IME composing text (Android) + modern TextInput rendering
 
He also told me to rework the passing of the value to the default attribute via a variable and not use a collection or record.
This is also visible in the commented parts:
ctxPopisEdit
and
UpdateContext({ ctxPopisEdit: Self.Text })
but none of these recommendations helped solve my problem.

--------------------------------------------------------
This is the code for the classic TextInput - where this problem does not occur
- txt_clasic_popis_vsa_3:
    Control: Classic/TextInput@2.3.2
    Properties:
      AlignInContainer: =AlignInContainer.Start
      BorderStyle: =//BorderStyle.Solid
      BorderThickness: =0
      Clear: =true
      Default: |-
        =If(tgl_zobraz_modernTable.Checked,
 
            modernTable_aktivity.Selected.Popis      
            ,
            First(colSelectedRecord).Popis
 
            //predtym funguje  
            //DataTable_aktivity_2.Selected.Popis
 
        )
      DisplayMode: DisplayMode.Edit
      EnableSpellCheck: =true
      Fill: =RGBA(166, 166, 166, 0.1)
      FocusedBorderThickness: =//4
      Height: =100
      HoverBorderColor: =//App.Theme.Colors.Darker40
      HoverFill: =//App.Theme.Colors.Lighter70
      LayoutMinHeight: =16
      LayoutMinWidth: =16
      LineHeight: =1.1
      Mode: =TextMode.MultiLine
      OnChange: =Select(btn_SaveControl_pred_ulozenim)
      PaddingLeft: =10
      RadiusBottomLeft: =0
      RadiusBottomRight: =0
      RadiusTopLeft: =0
      RadiusTopRight: =0
      Size: =10
      Visible: =If('Screen - aktivity'.Size <=4 , true, false)
      Width: =Parent.Width


-----------------------------------
Please, does anyone have the same problem? Has anyone encountered this before? Can you advise me where I might be wrong if it is not a bug in modern TextInput? Thank you in advance for all the advice.


 
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    This is most likely a limitation/bug in the Modern TextInput control on Android when used with autocorrect (IME composing text).
     
    The issue occurs because the control re-evaluates its Default value or re-renders during typing, which resets the cursor position and moves text to the beginning.
     
    The recommended solution is to decouple the Default property from dynamic data sources, avoid triggering updates during OnChange, and, if necessary, use the
     
    classic TextInput as a fallback on Android.
  • Suggested answer
    Valantis Profile Picture
    6,735 on at
    Hi @TomGaz,
     
    Your diagnosis is correct. This is a confirmed known behavior with modern TextInput on Android. Android uses an IME (Input Method Editor) composing mechanism that works differently from iOS when autocorrect fires, Android sends the replacement as an IME composition event. The modern TextInput control (which uses a React Native-based implementation on mobile) doesn't handle IME composition events the same way the classic TextInput does, causing the cursor reset to the beginning.
     
    This specific Android + IME + modern control combination is a documented limitation and you're not doing anything wrong in your code.
    One thing worth checking in your specific setup: your OnChange fires Select(btn_SaveControl_pred_ulozenim) on every change. If that button press causes any state update that triggers re-evaluation of the Default property while the Android IME is mid-composition, it can amplify the cursor jumping. Try temporarily removing the OnChange logic and testing with autocorrect — if the cursor jumping stops or improves, the OnChange re-triggering Default is contributing to the issue.
     
    For a production fix right now, the reliable options are:
     
    1. Use classic TextInput for multiline text fields on mobile (you already confirmed this works)
    2. For the modern control, add a delay before any state update in OnChange using a Timer control to avoid interrupting IME composition
    3. Report this to Microsoft via https://aka.ms/powerappsfeedback with your reproduction steps — Android IME + modern TextInput multiline + autocorrect is a specific enough scenario for the product team to action
     
    This isn't something you can fully fix in Power Apps formula code because the root cause is in how the modern control handles Android keyboard events.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard