Created
May 3, 2018 12:08
-
-
Save rao123dk/3dac7a6738e453854ee96cf67fdaa3e0 to your computer and use it in GitHub Desktop.
Detect user input data when user type with Input method editor(IME).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//The compositionstart, compositionupdate and compositionend events might be helpful. They help you detect when IME input is being used. | |
EVENTS FIRE | |
When IME is visible :- | |
--> compositionstart, compositionupdate, compositionend, input | |
When IME closed :- | |
--> keydown, input | |
$('#id').on('compositionupdate', function(e) { | |
console.log(e.data); | |
}); | |
$('#id').on('compositionstart', function(e) { | |
console.log(e.data); | |
}); | |
$('#id').on('compositionend', function(e) { | |
console.log(e.data); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment