Last active
December 27, 2017 05:12
-
-
Save susemeee/1a83d8361975226f9fb71f915d325a00 to your computer and use it in GitHub Desktop.
Enhancement of handling a data binding of angular.js (related to Korean IME composition event)
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
// angular.module('YOUR_APP').directive('koreanInput', KoreanInputDirective); | |
// SEE: https://github.com/angular/angular.js/issues/13617 | |
export default function KoreanInputDirective () { | |
return { | |
restrict: 'A', | |
link: { | |
post: function (scope, element, attrs) { | |
element.on('compositionupdate', function (e) { | |
element.triggerHandler('compositionend'); | |
}); | |
}, | |
}, | |
}; | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment