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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Issue with the Text Input (Modern Control) in Canvas Apps

(4) ShareShare
ReportReport
Posted on by 2,100
Hi Team,
 
We've observed that the new "Text Input" control in canvas apps or custom pages doesn't support the "OnSelect" property, which was previously available in the classic "Text Box" control.
 
While the modern control does include the "OnChange" property, but our requirement is to trigger logic as soon as the user clicks or focuses on the text box.
 
Is there any way to replicate this behavior in the modern control, similar to how the "OnSelect" event worked in the classic control?
 
Any kind of help would be greatly appreciated.
 
Thank you
Categories:
I have the same question (0)
  • Suggested answer
    Holly Huffman Profile Picture
    6,530 Super User 2025 Season 2 on at
    Good morning, afternoon, or evening depending on your location!
     
    The modern "Text Input" control in Power Apps does not support the "OnSelect" property, as you've noted. However, you can replicate similar behavior using alternative approaches.
    1. Use the OnChange Property:
    • While it doesn't trigger logic on focus or click, you can use the OnChange property to execute actions when the user modifies the text. This is the closest built-in functionality available.
    2. Overlay a Transparent Button:
    • Place a transparent button over the text input control. Set the button's OnSelect property to trigger your desired logic. When the user clicks the text box, they'll actually be interacting with the button.
    3. Focus Detection with Timer Control:
    • Use a timer control to detect when the text input gains focus. Combine this with the FocusedBorderColor property to visually indicate focus and trigger logic indirectly.
    4. Custom Component:
    • Create a custom component that combines the modern text input control with additional functionality, such as focus detection or click events.
     
    Hope this is helpful :)
  • Suggested answer
    Inogic Profile Picture
    682 on at
    Hi,
     
    There are a few creative workarounds you can use to replicate “OnSelect” or “OnFocus” behavior in modern Text Input controls. Follow the below steps.

    1. Add a Timer control
    • Set Duration to something small, like 10
    • Set Repeat to false
    • Set AutoStart to false
    • Set Visible to false (optional)

    2. Add a variable to detect focus
    • In your screen's OnVisible, initialize:
                   
    Set(varFocused, false); Set(varShowOverlay, true)
    3. Add a transparent Rectangle over the Text Input
    • Drag the Rectangle to cover the Text Input exactly (or slightly larger if needed).
    • Resize it to match the size of Text Input.
    • This will simulate OnSelect
    • Set Fill to RGBA(0, 0, 0, 0), Visible to varShowOverlay, BorderThickness to 0, and ensure it's on top of the Text Input
    • Right-click the rectangle Reorder Bring to Front
                  4. OnSelect of this Rectangle:
          Set(varFocused, true); Timer1.Start=true; Set(varShowOverlay, false);

                 5. In Timer1.OnTimerEnd:
          SetFocus(Text Input)

    Now you're programmatically focusing the input and can add any logic in OnSelect property of Rectangle.

    Hope this helps.
     
    Thanks!
    Inogic

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 93 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 76

#3
Martin Dráb Profile Picture

Martin Dráb 64 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans