Placing that code on the page didn't do anything to prevent the background action from taking over after hesitating on the keyboard for 1/2 second or so. I still then have to wait 3 to 4 seconds before the typing appears in sync with the keyboard.
Fred