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 = {
28
28
: 'innerHTML'
29
29
30
30
var compositionLock = false
31
- el . addEventListener ( 'compositionstart' , function ( ) {
31
+ this . cLock = function ( ) {
32
32
compositionLock = true
33
- } )
34
- el . addEventListener ( 'compositionend' , function ( ) {
33
+ }
34
+ this . cUnlock = function ( ) {
35
35
compositionLock = false
36
- } )
36
+ }
37
+ el . addEventListener ( 'compositionstart' , this . cLock )
38
+ el . addEventListener ( 'compositionend' , this . cUnlock )
37
39
38
40
// attach listener
39
41
self . set = self . filters
@@ -114,10 +116,13 @@ module.exports = {
114
116
} ,
115
117
116
118
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 )
118
123
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 )
121
126
}
122
127
}
123
128
}
You can’t perform that action at this time.
0 commit comments