mirror of https://github.com/vuejs/vue.git
perfectly resolve Chinese input methods issue with composition events
This commit is contained in:
parent
bcff84ebab
commit
1e587210d7
|
|
@ -27,9 +27,18 @@ module.exports = {
|
|||
? 'value'
|
||||
: 'innerHTML'
|
||||
|
||||
var compositionLock = false
|
||||
el.addEventListener('compositionstart', function () {
|
||||
compositionLock = true
|
||||
})
|
||||
el.addEventListener('compositionend', function () {
|
||||
compositionLock = false
|
||||
})
|
||||
|
||||
// attach listener
|
||||
self.set = self.filters
|
||||
? function () {
|
||||
if (compositionLock) return
|
||||
// if this directive has filters
|
||||
// we need to let the vm.$set trigger
|
||||
// update() so filters are applied.
|
||||
|
|
|
|||
Loading…
Reference in New Issue