mirror of https://github.com/vuejs/vue.git
only listen for composition event when has filters, use fork for vinyl-fs, update travis script
This commit is contained in:
parent
398419f3bd
commit
303cacc183
|
|
@ -5,11 +5,6 @@ branches:
|
|||
only:
|
||||
- master
|
||||
before_install:
|
||||
- npm install -g grunt-cli component
|
||||
- git clone git://github.com/n1k0/casperjs.git ~/casperjs
|
||||
- cd ~/casperjs
|
||||
- git checkout tags/1.1-beta1
|
||||
- export PATH=$PATH:`pwd`/bin
|
||||
- cd -
|
||||
- npm install -g grunt-cli component phantomjs casperjs
|
||||
before_script:
|
||||
- component install
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
"shell-task": "~0.1.1",
|
||||
"map-stream": "0.0.4",
|
||||
"uglify-js": "~2.4.8",
|
||||
"vinyl-fs": "git://github.com/wearefractal/vinyl-fs",
|
||||
"vinyl-fs": "git://github.com/yyx990803/vinyl-fs",
|
||||
"gulp-component": "~0.1.3"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,22 +20,24 @@ module.exports = {
|
|||
? 'change'
|
||||
: 'input'
|
||||
|
||||
// determin the attribute to change when updating
|
||||
// determine the attribute to change when updating
|
||||
var attr = self.attr = type === 'checkbox'
|
||||
? 'checked'
|
||||
: (tag === 'INPUT' || tag === 'SELECT' || tag === 'TEXTAREA')
|
||||
? 'value'
|
||||
: 'innerHTML'
|
||||
|
||||
var compositionLock = false
|
||||
this.cLock = function () {
|
||||
compositionLock = true
|
||||
if (self.filters) {
|
||||
var compositionLock = false
|
||||
this.cLock = function () {
|
||||
compositionLock = true
|
||||
}
|
||||
this.cUnlock = function () {
|
||||
compositionLock = false
|
||||
}
|
||||
el.addEventListener('compositionstart', this.cLock)
|
||||
el.addEventListener('compositionend', this.cUnlock)
|
||||
}
|
||||
this.cUnlock = function () {
|
||||
compositionLock = false
|
||||
}
|
||||
el.addEventListener('compositionstart', this.cLock)
|
||||
el.addEventListener('compositionend', this.cUnlock)
|
||||
|
||||
// attach listener
|
||||
self.set = self.filters
|
||||
|
|
@ -118,8 +120,10 @@ module.exports = {
|
|||
unbind: function () {
|
||||
var el = this.el
|
||||
el.removeEventListener(this.event, this.set)
|
||||
el.removeEventListener('compositionstart', this.cLock)
|
||||
el.removeEventListener('compositionend', this.cUnlock)
|
||||
if (this.filters) {
|
||||
el.removeEventListener('compositionstart', this.cLock)
|
||||
el.removeEventListener('compositionend', this.cUnlock)
|
||||
}
|
||||
if (isIE9) {
|
||||
el.removeEventListener('cut', this.onCut)
|
||||
el.removeEventListener('keyup', this.onDel)
|
||||
|
|
|
|||
Loading…
Reference in New Issue