File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,14 @@ module.exports = {
2828 : 'innerHTML'
2929
3030 var compositionLock = false
31- el . addEventListener ( 'compositionstart' , function ( ) {
31+ this . cLock = function ( ) {
3232 compositionLock = true
33- } )
34- el . addEventListener ( 'compositionend' , function ( ) {
33+ }
34+ this . cUnlock = function ( ) {
3535 compositionLock = false
36- } )
36+ }
37+ el . addEventListener ( 'compositionstart' , this . cLock )
38+ el . addEventListener ( 'compositionend' , this . cUnlock )
3739
3840 // attach listener
3941 self . set = self . filters
@@ -114,10 +116,13 @@ module.exports = {
114116 } ,
115117
116118 unbind : function ( ) {
117- this . el . removeEventListener ( this . event , this . set )
119+ var el = this . el
120+ el . removeEventListener ( this . event , this . set )
121+ el . removeEventListener ( 'compositionstart' , this . cLock )
122+ el . removeEventListener ( 'compositionend' , this . cUnlock )
118123 if ( isIE9 ) {
119- this . el . removeEventListener ( 'cut' , this . onCut )
120- this . el . removeEventListener ( 'keyup' , this . onDel )
124+ el . removeEventListener ( 'cut' , this . onCut )
125+ el . removeEventListener ( 'keyup' , this . onDel )
121126 }
122127 }
123128}
You can’t perform that action at this time.
0 commit comments