Not happy about this. Even though it was executing this code in the next event loop (when the timeout was set to 0), the input value still hadn't been updated.