Share via

SetFocus does not work with Modern TextInput in Power Apps

NEV IT02 0 Reputation points
2026-05-06T01:20:04.1733333+00:00

I am using Power Apps Canvas app and encountered a couple of issues with TextInput controls (both Classic and Modern).

  1. SetFocus issue:

When a TextInput is placed inside a Vertical Container, calling:

SetFocus(TextInput1)

does not work.

However:

  • If the TextInput is outside the Vertical Container, SetFocus works correctly
  • This behavior seems different from previous versions, where it worked even inside containers
  1. TriggerOutput limitation:

For both Classic and Modern TextInput, I am using:

TriggerOutput = Delayed

However, I cannot find any way to configure or adjust the delay time for this behavior.

Questions:

  1. Is SetFocus not supported for controls inside Vertical Containers (by design or regression)?
  2. Does this affect both Classic and Modern TextInput controls?
  3. Is there any way to customize the delay duration of TriggerOutput.Delayed?
  4. Are there recommended workarounds for these limitations?

These issues are impacting user experience, especially for input flows requiring controlled focus and delayed input handling.

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Vivian-HT 15,530 Reputation points Microsoft External Staff Moderator
    2026-05-06T02:20:57.7533333+00:00

    Dear @NEV IT02,

    Thank you for providing the detailed context. I can understand how these behaviors are affecting your input flow and overall user experience.

    According to my research based on the current Power Apps behavior, what you are observing with SetFocus() is expected. The function cannot set focus on controls that are placed inside container controls, including Vertical Containers. For reference: SetFocus function

    Regarding the TriggerOutput property, when it is set to Delayed, the platform applies a short internal delay before updating the control’s value or firing related logic. However, there isn't any official information about the supported way to configure or adjust this delay duration. For reference: Text Input modern control in canvas apps and Text input control in Power Apps

    However, the issue you are facing is related to Microsoft Power Platform (specifically Power Apps), rather than Office 365 products. As this forum mainly focuses on Office 365 services, there may be limitations in the depth of support I can reliably provide for Power Platform-specific scenarios.

    Therefore, to ensure that you receive the most accurate guidance, including recommended customizations and proven workarounds, I would strongly suggest posting your question on the Microsoft Power Platform Community. This forum is dedicated to Power Apps and related technologies, and it is actively monitored by product experts, engineers, and experienced community members. You can reach out to a highly specialized audience who deal with similar scenarios regularly and can provide more targeted solutions. It is also a great place to learn from existing discussions and shared best practices.

    You can access it here: https://community.powerplatform.com/

    Note: I truly apologize for redirecting you to a different community as the members of the posted category focus on users with Microsoft 365 concern and have limited knowledge about Power Automate, so to get a quick and better assistance, I redirect you in the correct way. 

    I appreciate your patience and understanding and thank you for your time and cooperation. If you have any further questions or any concerns, please feel free to reach out. I'm happy to assist further.

    0 comments No comments

  2. Q&A Assist
    2026-05-06T01:20:16.5266667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more
    1. SetFocus and Vertical Containers The provided information only documents how SetFocus is used in general (for example, on a screen’s OnVisible to focus a control) and how focus can be driven indirectly via component InputEvent using a SetFocus-prefixed string. It does not document any limitation or behavioral difference for controls inside a Vertical Container versus outside it, nor does it distinguish between classic and modern TextInput for SetFocus. The behavior described (working outside but not inside a Vertical Container) is therefore not covered by the referenced documentation and cannot be confirmed as by-design or a regression from the available material.
    2. Classic vs. Modern TextInput The context explicitly documents behavior differences for modern Text Input controls (for example, OnChange firing on focus out and the TriggerOutput options), but does not state any difference between classic and modern TextInput regarding SetFocus. No statement is provided that SetFocus is unsupported or behaves differently for modern TextInput compared to classic.
    3. Customizing TriggerOutput.Delayed duration For modern Text Input, TriggerOutput supports:
    • TriggerOutput.Keypress
    • TriggerOutput.FocusOut
    • TriggerOutput.Delayed

    The documentation states that Delayed is used in forms for better performance but does not expose any property or setting to configure the delay interval. There is no documented way to customize the delay duration of TriggerOutput.Delayed for Text Input (classic or modern) in the provided material.

    1. Workarounds (based on documented behavior) Within the documented capabilities:
    • To react immediately to user input without relying on OnChange, formulas can reference the Text Input’s output property directly (for example, TextInput1.Text) while using TriggerOutput.Keypress when per-keystroke responsiveness is needed.
    • For focus control in component scenarios, focus can be driven via an InputEvent pattern using a context variable whose value starts with "SetFocus" and changes each time, for example:
        UpdateContext({ ctxComponentEvent: "SetFocus" & Text(Rand()) });
      
      with the component’s InputEvent bound to ctxComponentEvent.

    The documentation does not provide a specific workaround for SetFocus failing inside a Vertical Container, nor any container-specific focus guidance beyond the general SetFocus and InputEvent patterns.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.