C2LC-627: It is possible to lose edits to the number of iterations when using keyboard shortcuts

Description

I found the following when testing the use of loops with an updated Grid 3 keyboard.

It’s possible to lose edits to the number of iterations when a keyboard shortcut is used that causes the UI to update (such as using the keyboard shortcut for Play).

To reproduce:

  • Turn on keyboard shortcuts
  • Add a loop to the program
  • Focus the number of iterations text box
  • Edit the number of iterations
  • Press the shortcut to run the program (Ctrl+Alt+p)

Expected:

  • Program to run with the new number of iterations

Actual:

  • Program is run with the previous number of iterations, before the edit