Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Focusing input one after another gets blurred because of onChange action



I have a PowerApps application page where I have multiple input controls one after another with some onChange" code and when you exit(blur) the first control by clicking on the next one, the cursor only stays there for a moment, then it blurs, you have to click the input again in order to be able to enter text.  (same thing if you want to proceed with 'Tab').
The onChange code has some UpdateContext on it, setting its value to a variable. I need it because the inputs are in a gallery placed as rows and I need to update the properties of the element in the row, and for some values other properties are recalculated as well.
Did anyone encounter this behavior? Any suggestions?
Community Support
Community Support

Hi @tkantor :

I'v made a test but did not encounted the problem you mentioned.


I suggest you change the device and test again.

If the problem can not be solved, could you tell me more details about the app? For example:

  • What exactly are these input controls?
  • What are these input controls' OnSelect attribute? (Specific code)
  • Are these controls in a gallery?What are the specific settings?

Best Regards,


Having inputs: txtVal1, txtVal2, txtResult. Each has the 'default' set to the backing property from the colGallery element: value1, value2 and result

Here is the onChange code for input txtVal1:

UpdateIf(colGallery, uniqId = ThisItem.uniqId, {value1: If(!IsBlank(txtVal1.Text), Value(txtVal1.Text, "fr-FR"), Blank())});
    !IsBlank(ThisItem.value1) && !IsBlank(ThisItem.value2),
        uniqId = ThisItem.uniqId,
        { result: value1 * value2}
        uniqId = ThisItem.uniqId,
        { result: Blank()}

Also I have input field outside the gallery with some onChange code that affects the colGallery and the same happens when I move focus from that input to one inside the gallery. Moving focus from gallery input to the one outside the gallery works fine - not blurred.


Seems that the problem is that I alter the colGallery, and reloading the displayed values blurs the inputs

Hi @tkantor :

I did the test according to your description and still did not reproduce the problem you mentioned.(The data source I use here is a collection)


Best Regards,


In my page the layout is like this:


You see the same fields are edited and calculated here, and after clicking and typing in Value1 you should click on input Value2 directly, not outside anywhere in the screen and then on the next input as you do in your example.

Hi @tkantor :

Did you get blurred when you plan to edit the value2 of this item after editing the value1?
My guess is the delay caused by the change in the data source.
To verify this problem, I suggest that you can delete the OnChange proerty of these controls. Instead, add a button in the gallery to submit the update uniformly.

Best Regards,


Hi Bof, Thanks for the responsiveness.

Yes, exactly it gets blurred when I plan to edit the value2 of this item after editing the value1.

Clearly this does not occur if I remove the onChange code, also if I click and don't edit txtVal1 and then click on txtVal2 it stays focused.

I'm sorry to hear there is no other solution, it was request to easily go through fields with the use of Tab key and edit each field in this way.

All the best, Timea

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.


New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,944)