Fix potential race condition when text input state change and focus change...
Fix potential race condition when text input state change and focus change happened at the same time
In some cases, stateCommitted may fire after a new surface being focused and in correctly set input method to be inactive. This can be reproduced by switch client between an active text input v3 client and text input v2 client.